Mail Archives: djgpp/2001/06/07/10:20:18
This is a multi-part message in MIME format.
------=_NextPart_000_003D_01C0EF3B.305FFD80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Looks like you were right here - this little program didn't go through...
I've attached the crash dump of the test program you wrote (NAMETEST.EXE)
Small question: what does this line of code do?
...
(void) argc;
...
Alex
> I still recommend to find a reason of this problem with simple examples
> as this could be a problem with PTS-DOS. Otherwise I'm afraid we'll run
> into the same problem with gcc-3.0 when it will be released.
>
> Below is simple example (You could try also to generate absolute path
> instead of relative one)
>
> Andris
>
> #include <unistd.h>
> #include <stdio.h>
> #include <string.h>
> #include <assert.h>
> #include <sys/stat.h>
>
> int main (int argc, char * argv[])
> {
> char fname [FILENAME_MAX];
> (void) argc;
> mkdir ("foo",0755);
> strcpy (fname, "foo/../");
> strcat (fname, basename(argv[0]));
> assert (access(fname,0)==0);
> rmdir ("foo");
> return 0;
> }
>
>
------=_NextPart_000_003D_01C0EF3B.305FFD80
Content-Type: application/octet-stream;
name="NAMETEST.OUT"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="NAMETEST.OUT"
Assertion failed at nametest.c line 14: access(fname,0)=3D=3D0
Exiting due to signal SIGABRT
Raised at eip=3D00003f86
eax=3D0009459c ebx=3D00000120 ecx=3D00000000 edx=3D000222c0 =
esi=3D00000054 edi=3D000147cc
ebp=3D00094648 esp=3D00094598 program=3DD:\CD4000\PROBE.TC\NAMETEST.EXE
cs: sel=3D00e7 base=3D100a0000 limit=3D0009ffff
ds: sel=3D00ef base=3D100a0000 limit=3D0009ffff
es: sel=3D00ef base=3D100a0000 limit=3D0009ffff
fs: sel=3D00cf base=3D000222c0 limit=3D0000ffff
gs: sel=3D00ff base=3D00000000 limit=3D0010ffff
ss: sel=3D00ef base=3D100a0000 limit=3D0009ffff
App stack: [000947cc..000147cc] Exceptn stack: [00014720..000127e0]
Call frame traceback EIPs:
0x00003ea4 ___djgpp_traceback_exit+48
0x00003f86 _raise+94
0x00002f1c ___dj_assert+40
0x00001625 _main+137, line 14 of nametest.c
0x00002a22 ___crt1_startup+178
------=_NextPart_000_003D_01C0EF3B.305FFD80--
- Raw text -