#1973 Caught sigal 11: SIGSEGV

closed-fixed
z80 port (190)
5
2012-08-14
2012-03-16
Woody
No

1. Sample code attached in sdcc.rar. Please extract it to c:\sdcc, and copy 3 files sdasz80, sdcc.exe and sdcpp.exe to c:\sdcc\bin\ 2.. Command line used: cd C:\SDCC\src, and run mk.bat
3. SDCC version: SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.3 #7453 (Mar 15 2012) (MINGW32)
4. Error output:
C:\SDCC\BIN\sdcc sips.c -mz80 -c --std-c99 --max-allocs-per-node 6000 --codeseg CODE5
Caught signal 11: SIGSEGV
sdcpp.exe: fatal error: when writing output to : Invalid argument
..\bin\make: *** [sips.rel] Error 1
Simply run "C:\SDCC\BIN\sdcc sips.c -mz80 -c --std-c99 --max-allocs-per-node 6000 --codeseg CODE5" does not have the problem.

Discussion

<< < 1 2 3 > >> (Page 2 of 3)
  • Borut Ražem
    Borut Ražem
    2012-04-03

    I tried it with the snapshot sdcc version:

    >..\bin\sdcc --version
    SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.4 #7525 (Apr 2 2012) (MINGW32)

    dtmf.c compiled without problems, but the build failed later on without any additional error messages while compiling sntp.c:

    n:\tmp\bug_3506333\sdcc\BIN\sdcc sntp.c -mz80 -c --std-c99 --max-allocs-per-node 6000 --codeseg CODE2
    Caught signal 11: SIGSEGV
    ..\bin\make: *** [sntp.rel] Error 1

    Borut

     
  • Can you try once more? I added another two assertions (in #7531).

    Philipp

     
  • Woody
    Woody
    2012-04-05

    I downloaded #7530, found a lot of new warnings like:
    Warning: z80instructionSize() failed to parse line node di
    Warning: z80instructionSize() failed to parse line node ei
    Warning: z80instructionSize() failed to parse line node nop
    Warning: z80instructionSize() failed to parse line node push iy
    Warning: z80instructionSize() failed to parse line node push af
    Warning: z80instructionSize() failed to parse line node exx
    The source code related with those instructions are all inline asm:
    __asm
    // di
    exx
    push af
    push iy
    __endasm;

    Finally, caught signal 11 in sntp.c without any special warning or error:
    C:\SDCC\BIN\sdcc sntp.c -mz80 -c --std-c99 --codeseg CODE2
    Caught signal 11: SIGSEGV

     
  • Woody
    Woody
    2012-04-05

    I tried --oldralloc option just now,, z80instructionSize() failed warning and caught signal 11 in sntp.c appeared the same.

     
  • Could you file a separate bug report for the z80instructionSize() issue? Please attach source code to rreporduce that one there, too. I suspect it is an issue with the inline asm containing a different type of whitespace from what z80instructionSize() expects.

    Philipp

     
  • Woody
    Woody
    2012-04-06

    Build #7531 is the same as #7530, no special error before:
    C:\SDCC\BIN\sdcc sntp.c -mz80 -c --std-c99 --codeseg CODE2
    Caught signal 11: SIGSEGV
    ..\bin\make: *** [sntp.rel] Error 1

     
  • This lis most likely the same issue as #3506333, though this one occours on Windows and the other one on Solaris.

    Philipp

     
  • Borut Ražem
    Borut Ražem
    2012-04-08

    I noticed that ds390 library file ds390/_atof.rel compilation dies with SIGSEGV if sdcc is compiled with -O0 instead of the default -O2 optimization option:

    make[4]: Entering directory `/home/borutr/svn_snapshots/sdcc/sdcc.build/device/lib'
    ../../bin/sdcc -I../../../sdcc/device/include -I../../../sdcc/device/include/mcs51 -mds390 --nostdinc --std-c99 -c ../../../sdcc/device/lib/_atof.c -o ds390/_atof.rel
    Caught signal 11: SIGSEGV
    make[4]: *** [ds390/_atof.rel] Error 1

    Sdcc version:
    SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.4 #7552 (Apr 8 2012) (Linux)
    on x86_64 Linux

    Borut

     
  • Woody
    Woody
    2012-08-10

    Tested again just now, no problem with current build #8062.

     
    • assigned_to: nobody --> spth
    • status: open --> closed-fixed
     
<< < 1 2 3 > >> (Page 2 of 3)