[Bug c/43556] New: Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com
My system is Ubuntu 64 bits Lucid Lynx.
with this following small program, I obtain a crazy segmentation fault in
strchr() with gcc4.4.3-4ubuntu5 AND NOT with gcc4.4.1-4ubuntu9 (with same glibc
in both case) :

// gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 -> execution gives a "segmentation fault"
// gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1 -> execution is fully OK
#include 
#include 

char t[]="It: is a gcc4.4.3 bug";

main() {
char *p;

puts(t);
p = strchr(t, ':');
printf("p='%s'\n", p);

return 0;
}

Many best regards.
Eric.


-- 
   Summary: Ubuntu : segmentation fault in strchr() obtained with
gcc4.4.3 and not with gcc4.4.1
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot cabret at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #2 from eric dot cabret at gmail dot com  2010-03-28 20:34 
---
Created an attachment (id=20234)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20234&action=view)
Preprocessed source not OK with "gcc -E main.c"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #3 from eric dot cabret at gmail dot com  2010-03-28 20:34 
---
Created an attachment (id=20235)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20235&action=view)
Preprocessed source OK with "gcc -E main.c"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #4 from eric dot cabret at gmail dot com  2010-03-28 20:35 
---
Created an attachment (id=20236)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20236&action=view)
a.out OK obtained by command "gcc main.c"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #5 from eric dot cabret at gmail dot com  2010-03-28 20:36 
---
Created an attachment (id=20237)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20237&action=view)
a.out not OK obtained by command "gcc main.c"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #6 from eric dot cabret at gmail dot com  2010-03-28 20:37 
---
Here are new files (preprocessed sources OK and not OK) and binaries obtained
only with command "gcc main.c"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #7 from eric dot cabret at gmail dot com  2010-03-28 20:45 
---
Created an attachment (id=20238)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20238&action=view)
a.out OK obtained by command "gcc -g main.c" (with debug infos on 64bit ubuntu)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #8 from eric dot cabret at gmail dot com  2010-03-28 20:45 
---
Created an attachment (id=20239)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20239&action=view)
a.out not OK obtained by command "gcc -g main.c" (with debug infos on 64bit
ubuntu)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #9 from eric dot cabret at gmail dot com  2010-03-28 20:52 
---
Created an attachment (id=20240)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20240&action=view)
File obtained with command "strace -s 1024 ./a_ok_withdebug.out >
strace_s1024_a_ok.txt 2>&1"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #10 from eric dot cabret at gmail dot com  2010-03-28 20:52 
---
Created an attachment (id=20241)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20241&action=view)
File obtained with command "strace -s 1024 ./a_nok_withdebug.out >
strace_s1024_a_nok.txt 2>&1"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug c/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-28 Thread eric dot cabret at gmail dot com


--- Comment #11 from eric dot cabret at gmail dot com  2010-03-28 21:01 
---
Created an attachment (id=20242)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20242&action=view)
File obtained with command "strace -s 1024 ./a_nok_withdebug.out >
strace_s1024_a_nok.txt 2>&1" (executed on the SAME SYSTEM than file attachment
#20240 that was OK)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug middle-end/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-29 Thread eric dot cabret at gmail dot com


--- Comment #24 from eric dot cabret at gmail dot com  2010-03-29 20:44 
---
I checked on my Ubuntu 64bit Lucid Lynx system that generates bad binary :
1) binutils (2.20.1-3ubuntu1) is installed
2) binutils-gold (2.20-0ubuntu2) is NOT installed

(In reply to comment #23)
> only seen with gold (2.20.1). gold from the trunk does work.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556



[Bug middle-end/43556] Ubuntu : segmentation fault in strchr() obtained with gcc4.4.3 and not with gcc4.4.1

2010-03-29 Thread eric dot cabret at gmail dot com


--- Comment #25 from eric dot cabret at gmail dot com  2010-03-29 21:48 
---
I've reported this problem to Ubuntu at this following URL :
https://bugs.launchpad.net/ubuntu/+bug/551245


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556