bugTiny C Compiler - Bugs: bug #63387, Segmentation fault when compiling...

 
 

bug #63387: Segmentation fault when compiling C program

Submitter:  None
Submitted:  Sat 19 Nov 2022 08:20:08 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 29 Nov 2022 05:48:22 PM UTC, comment #1: 

I tried the program with lastest tcc at:
git clone git://repo.or.cz/tinycc.git

It works correctly.
tcc -v shows:
tcc version 0.9.27 mob:a722a12-mod (x86_64 Linux)

Herman ten Brugge <hermantb>
Sat 19 Nov 2022 08:20:08 PM UTC, original submission:  

TCC fails to compile a simple C program. Could be related to https://savannah.nongnu.org/bugs/?56965 but it seems to fault in a different location.

Command used:

./tcc -nostldib test.c -o test


Output:

Segmentation fault


Contents of test.c:

void _start() {
  while (1)
    ;
}


System information:

Linux hostname 6.0.7-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 21:10:08 +0000 x86_64 GNU/Linux


Contents of config.mak:

# Automatically generated by configure - do not modify
prefix=/usr/local
bindir=$(DESTDIR)/usr/local/bin
tccdir=$(DESTDIR)/usr/local/lib/tcc
libdir=$(DESTDIR)/usr/local/lib
includedir=$(DESTDIR)/usr/local/include
mandir=$(DESTDIR)/usr/local/share/man
infodir=$(DESTDIR)/usr/local/share/info
docdir=$(DESTDIR)/usr/local/share/doc
CC=gcc
GCC_MAJOR=12
GCC_MINOR=2
AR=ar
STRIP=strip -s -R .comment -R .note
CFLAGS=-Wall -g -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result
LDFLAGS=
LIBSUF=.a
EXESUF=
DLLSUF=.so
NATIVE_DEFINES+=-DCONFIG_LDDIR="\"lib64\""
ARCH=x86_64
TARGETOS=Linux
VERSION = 0.9.27
TOPSRC=/home/cayden/LIB/tcc


Contents of config.h:

/* Automatically generated by configure - do not modify */
#ifndef CONFIG_TCCDIR
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
#endif
#define TCC_VERSION "0.9.27"


Output of ./tcc -v:

tcc version 0.9.27 (x86_64 Linux)


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hermantb (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code