#263 segmentation fault - svn 961

None
closed
Borut Ražem
None
1
2013-04-18
2013-04-13
Gál Zsolt
No

Hello,

I faced a problem with the latest svn version of gputils. First it was with SDCC during compiling so I went back to a previous version of gputils and the compiling process was ok.

Installing the svn 961 I got this message during compiling process of a small C program:

sdcc -mpic14 -p16f1938 -V --debug -Wl-c -Wl-m -I/home/zsolti/Fejlesztes/PIC_Programok/PIC16F/sdcc_teszt/2011_1026/ -o2011_1030_sdcc_test.hex 2011_1102_sdcc_test.o --use-non-free
using default linker script "/usr/local/share/gputils/lkr/16f1938_g.lkr"
gpreadobj.c:30: check_getl16: Assertion `((void *)0) != file_buf' failed.
Aborted
+ /usr/local/bin/gplink -I/usr/local/bin/../share/sdcc/lib/pic14 -I/usr/local/share/sdcc/lib/pic14 -I/usr/local/bin/../share/sdcc/non-free/lib/pic14 -I/usr/local/share/sdcc/non-free/lib/pic14 -I/usr/local/bin/../share/sdcc/lib/pic14 -I/usr/local/share/sdcc/lib/pic14 -I/usr/local/bin/../share/sdcc/non-free/lib/pic14 -I/usr/local/share/sdcc/non-free/lib/pic14 -c -m -w -r -o 2011_1030_sdcc_test.hex 2011_1102_sdcc_test.o libsdcce.lib pic16f1938.lib
+ /usr/local/bin/gplink -I/usr/local/bin/../share/sdcc/lib/pic14 -I/usr/local/share/sdcc/lib/pic14 -I/usr/local/bin/../share/sdcc/non-free/lib/pic14 -I/usr/local/share/sdcc/non-free/lib/pic14 -I/usr/local/bin/../share/sdcc/lib/pic14 -I/usr/local/share/sdcc/lib/pic14 -I/usr/local/bin/../share/sdcc/non-free/lib/pic14 -I/usr/local/share/sdcc/non-free/lib/pic14 -c -m -w -r -o 2011_1030_sdcc_test.hex 2011_1102_sdcc_test.o libsdcce.lib pic16f1938.lib returned errorcode 34304
Kilépési hely: 1

Discussion

  • Borut Ražem
    Borut Ražem
    2013-04-14

    Gal,

    can you please attach the 2011_1102_sdcc_test.o object file to this tracker, so that I can try to reproduce the problem?

    Borut

     
  • Gál Zsolt
    Gál Zsolt
    2013-04-14

    Hello Borut,

    Here is the .o file and the original also.

    Zsolt

     
    Attachments
  • Gál Zsolt
    Gál Zsolt
    2013-04-14

    Borut,

    Here is the whole directory.

    Zsolt

     
    Attachments
  • Borut Ražem
    Borut Ražem
    2013-04-14

    Fixed in svn revision #962.

    Zsolt, please verify if it works for you.

    Borut

     
  • Borut Ražem
    Borut Ražem
    2013-04-14

    • status: open --> closed
    • assigned_to: Borut Ražem
     
  • Gál Zsolt
    Gál Zsolt
    2013-04-15

    Hello Borut,

    Unfortunately I can not agree. The test project built without error, but a diffrent one generate this error:

    zsolti@cr700deb:~/Fejlesztes/PIC_Programok/PIC16F/PIC16F690/inverter_levalaszto/levalaszto_v01$ sdcc --use-non-free -mpic14 -p16f690 -V --debug -I/home/zsolti/Fejlesztes/PIC_Programok/PIC16F/PIC16F690/inverter_levalaszto/levalaszto_v01/ -c levalaszto.c --no-pcode-opt --nogcse
    + /usr/local/bin/sdcpp -nostdinc -Wall -I/home/zsolti/Fejlesztes/PIC_Programok/PIC16F/PIC16F690/inverter_levalaszto/levalaszto_v01/ -DSDCC_PROCESSOR="16f690" -DSDCC_PROCESSOR="16f690" -DSDCC_PIC16F690 -obj-ext=.o -DSDCC_USE_NON_FREE -DSDCC_USE_NON_FREE -DSDCC=3_2_1 -DSDCC=321 -DSDCC_REVISION=8508 -DSDCC_REVISION=8508 -DSDCC_pic14 -DSDCC_pic14 -Dpic14 -DSTDC_NO_COMPLEX -DSTDC_NO_THREADS -DSTDC_NO_ATOMICS -DSTDC_NO_VLA__ -isystem /usr/local/bin/../share/sdcc/include/pic14 -isystem /usr/local/share/sdcc/include/pic14 -isystem /usr/local/bin/../share/sdcc/include -isystem /usr/local/share/sdcc/include -isystem /usr/local/bin/../share/sdcc/non-free/include/pic14 -isystem /usr/local/share/sdcc/non-free/include/pic14 -isystem /usr/local/bin/../share/sdcc/non-free/include -isystem /usr/local/share/sdcc/non-free/include levalaszto.c
    + /usr/local/bin/gpasm -g -o levalaszto.o -c levalaszto.asm
    Segmentation fault
    + /usr/local/bin/gpasm -g -o levalaszto.o -c levalaszto.asm returned errorcode 35584

    I have made a fresh checkout from sdcc and gputils also. I installed gputils first and then compiled sdcc and installed it.

    The code is attached here which produced this result. I think it is not a complicated one.

    Zsolt

     
    Attachments
  • Borut Ražem
    Borut Ražem
    2013-04-15

    • status: closed --> open
     
  • Borut Ražem
    Borut Ražem
    2013-04-15

    Last time was a segvio in linker, now it is in assembler... Obviously the cuts I made were too deep and they would need more testing. But all assembler and linker regression tests pass without segvios.

    I'll try to fix the problem ASAP. Zsolt, thanks for your testing and patience.

    Borut

     

  • Anonymous
    2013-04-17

    Gpasm crashes only if the -g option is specified. This is also the reason why the bug is not discovered by regression tests.

    Minimal test case to reproduce the bug:

        .file    "levalaszto.c"
        list     p=16f690
        __config 0x3384
        end
    
     
    Last edit: Anonymous 2013-04-17

  • Anonymous
    2013-04-17

    Fixed (hopefully) in svn #964.

    Zsolt, can you please test it with your projects?

    Borut

     
  • Borut Ražem
    Borut Ražem
    2013-04-17

    • status: open --> closed
     

  • Anonymous
    2013-04-18

    Hello Borut!

    I didn't find this type of malfunction in svn #964. SDCC and GPUTILS compiled some of my project without error.
    I have realized another problem, but that need more deep investigation on my side and I think it is related rather by SDCC.

    Zsolt

     


Anonymous


Cancel   Add attachments