From: SourceForge.net <no...@so...> - 2012-03-17 04:49:32
|
Bugs item #3506333, was opened at 2012-03-16 12:45 Message generated for change (Comment added) made by woody1234 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3506333&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: z80 port Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Woody (woody1234) Assigned to: Nobody/Anonymous (nobody) Summary: Caught sigal 11: SIGSEGV Initial Comment: 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. ---------------------------------------------------------------------- >Comment By: Woody (woody1234) Date: 2012-03-16 21:49 Message: This is exactly why signal 11 puzzled me so much, different people (among our co-workers) get different crash with same source code. In our software, we actually did not use any SDCC include files and lib, only the directory name keep there because of historic reasons. As you can see from bug report 3475656, we provided all needed "system" functions like atoi without using standard lib. In other words, after download a snapshot of MINGW32 build, I only change four files: sdasz80, sdcc.exe, sdcpp.exe and sdld.exe. ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2012-03-16 16:03 Message: In my case sips.c compiled without crash, but compilation of dtmf.c crashed: n:\tmp\bug_3506333\sdcc\BIN\sdcc dtmf.c -mz80 -c --std-c99 --max-allocs-per-node 6000 --codeseg CODE1 Caught signal 11: SIGSEGV ..\bin\make.exe: *** [dtmf.rel] Error 1 I used the same sdcc version / revision, downloaded from the snapshots web page. I think Philipp should take a look what is happening... P.S.: it is a very bad practice mixing installed "system" header files, sources and binaries with the ones you wrote. You should put your source and header files in a separate directory and use -I command line option to define the path to your header files. Borut ---------------------------------------------------------------------- Comment By: Woody (woody1234) Date: 2012-03-16 12:58 Message: Just found (by error operation) that if I change c:\sdcc\src\makefile to double --std-c99 option, the signal 11 will not appear. Really interesting! C:\SDCC\BIN\sdcc sips.c -mz80 -c --std-c99 --std-c99 --max-allocs-per-node 6000 --codeseg CODE5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3506333&group_id=599 |