bugTiny C Compiler - Bugs: bug #14958, Option `-b' doesn't work for...

 
 

bug #14958: Option `-b' doesn't work for compiled programs

Submitted by:  None
Submitted on:  Fri 11 Nov 2005 06:01:45 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 19 Oct 2012 03:17:19 PM UTC, comment #2:

I believe the second issue posted was related to STT_GNU_IFUNC relocations missing in tcc. This has already been fixed.

Thomas Preud'homme <robotux>
Project Member
Tue 19 Oct 2010 10:15:11 AM UTC, comment #1:

related problem ?

linux 2.6.35-22-generic
tcc version 0.9.25

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[])
{
char *pollo= "ppooo";
printf("%s", pollo);
return 0;
}

calling tcc -b (mem/ptr bounds checker) fails :
tcc: undefined symbol 'memset'
tcc: undefined symbol 'memmove'
tcc: undefined symbol 'memcpy'

whitout -b, it works fine. why ?
Massimo
massimo.sala.71 / gmail.com

Massimo Sala <massimosala>
Fri 11 Nov 2005 06:01:45 PM UTC, original submission:

Example (test.c):

#include <stdio.h>

int main ()
{
int v[10];
v[10] = 1; /* Enforcing a seg-fault here ... */
printf ("v has %d elements.\n", sizeof(v) / sizeof(int));
return 0;
}

When executing `tcc -b -run test.c' the the runtime error message is printed as expected (but the program still aborts with a seg-fault), but when compiling `test.c' (using `tcc -b test.c -o test') and then executing the program `test' (`./test'), the execution leads to the usual `segmentation fault' - much like if `-b' was never supplied to the compiler. (This problem occurs likewise on SuSE-9.x and Debian 3.x .)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by robotux (Posted a comment)
  • -unavailable- added by massimosala (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup