Launchpad has imported 26 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43556.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2010-03-28T17:09:14+00:00 Eric CABRET wrote:

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 <stdio.h>
#include <string.h>

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.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/0

------------------------------------------------------------------------
On 2010-03-28T17:20:04+00:00 Rguenth wrote:

Works for me (thus I suggest to file a bug with Ubuntu).

Which optimization options?  Please attach preprocessed source.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/1

------------------------------------------------------------------------
On 2010-03-28T20:34:28+00:00 Eric CABRET wrote:

Created attachment 20234
Preprocessed source not OK with "gcc -E main.c"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/2

------------------------------------------------------------------------
On 2010-03-28T20:34:49+00:00 Eric CABRET wrote:

Created attachment 20235
Preprocessed source OK with "gcc -E main.c"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/3

------------------------------------------------------------------------
On 2010-03-28T20:35:49+00:00 Eric CABRET wrote:

Created attachment 20236
a.out OK obtained by command "gcc main.c"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/4

------------------------------------------------------------------------
On 2010-03-28T20:36:15+00:00 Eric CABRET wrote:

Created attachment 20237
a.out not OK obtained by command "gcc main.c"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/5

------------------------------------------------------------------------
On 2010-03-28T20:37:42+00:00 Eric CABRET wrote:

Here are new files (preprocessed sources OK and not OK) and binaries
obtained only with command "gcc main.c"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/6

------------------------------------------------------------------------
On 2010-03-28T20:45:18+00:00 Eric CABRET wrote:

Created attachment 20238
a.out OK obtained by command "gcc -g main.c" (with debug infos on 64bit ubuntu)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/7

------------------------------------------------------------------------
On 2010-03-28T20:45:44+00:00 Eric CABRET wrote:

Created attachment 20239
a.out not OK obtained by command "gcc -g main.c" (with debug infos on 64bit 
ubuntu)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/8

------------------------------------------------------------------------
On 2010-03-28T20:52:14+00:00 Eric CABRET wrote:

Created attachment 20240
File obtained with command "strace -s 1024 ./a_ok_withdebug.out > 
strace_s1024_a_ok.txt 2>&1"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/9

------------------------------------------------------------------------
On 2010-03-28T20:52:36+00:00 Eric CABRET wrote:

Created attachment 20241
File obtained with command "strace -s 1024 ./a_nok_withdebug.out > 
strace_s1024_a_nok.txt 2>&1"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/10

------------------------------------------------------------------------
On 2010-03-28T21:01:51+00:00 Eric CABRET wrote:

Created attachment 20242
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)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/11

------------------------------------------------------------------------
On 2010-03-29T07:56:08+00:00 Pawel-sikora-9 wrote:

i can confirm that gpf on my system (gcc-4.4.4, glibc-2.11.1).
i see diffs in relocations.

$ readelf -sW a_ok*|grep strchr
 5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 (2)
70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@@GLIBC_2.2.5

$ readelf -sW a_nok*|grep strchr
 5: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@GLIBC_2.2.5 (2)
69: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@@GLIBC_2.2.5


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/12

------------------------------------------------------------------------
On 2010-03-29T08:08:39+00:00 Eric CABRET wrote:

Dear Pawel,
Please could you tell me exactly if you had gpf on your system by recompiling 
and then executing my main.c ?
Many thanks for your contribution.
Eric.

(In reply to comment #12)
> i can confirm that gpf on my system (gcc-4.4.4, glibc-2.11.1).
> i see diffs in relocations.
> 
> $ readelf -sW a_ok*|grep strchr
>  5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 (2)
> 70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@@GLIBC_2.2.5
> 
> $ readelf -sW a_nok*|grep strchr
>  5: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@GLIBC_2.2.5 (2)
> 69: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@@GLIBC_2.2.5
> 

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/13

------------------------------------------------------------------------
On 2010-03-29T08:23:13+00:00 Pawel-sikora-9 wrote:

(In reply to comment #13)
> Dear Pawel,
> Please could you tell me exactly if you had gpf on your system by recompiling
> and then executing my main.c ?

i've only ran attached binaries (a_{n}ok_withdebug.out) under gdb.


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/14

------------------------------------------------------------------------
On 2010-03-29T08:46:59+00:00 Eric CABRET wrote:

What's happened if you recompile and run main.c with your gcc4.4.4 ?

(In reply to comment #14)
> (In reply to comment #13)
> > Dear Pawel,
> > Please could you tell me exactly if you had gpf on your system by 
> > recompiling
> > and then executing my main.c ?
> 
> i've only ran attached binaries (a_{n}ok_withdebug.out) under gdb.
> 


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/15

------------------------------------------------------------------------
On 2010-03-29T08:50:14+00:00 Eric CABRET wrote:

Created attachment 20246
main.c with segmentation fault if compiled with gcc-4.4.3

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/16

------------------------------------------------------------------------
On 2010-03-29T09:05:19+00:00 Pawel-sikora-9 wrote:

(In reply to comment #15)
> What's happened if you recompile and run main.c with your gcc4.4.4 ?

works fine because my toolchain doesn't emit STT_GNU_IFUNC
mark for strchr() symbol. you should ask Ubuntu support about
this issue.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/17

------------------------------------------------------------------------
On 2010-03-29T09:11:50+00:00 Eric CABRET wrote:

Thanks Pawel.

(In reply to comment #17)
> (In reply to comment #15)
> > What's happened if you recompile and run main.c with your gcc4.4.4 ?
> 
> works fine because my toolchain doesn't emit STT_GNU_IFUNC
> mark for strchr() symbol. you should ask Ubuntu support about
> this issue.
> 


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/18

------------------------------------------------------------------------
On 2010-03-29T09:45:30+00:00 Rguenth wrote:

Maybe HJL has an idea, too.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/19

------------------------------------------------------------------------
On 2010-03-29T13:55:37+00:00 Hjl-tools wrote:

(In reply to comment #12)
> i can confirm that gpf on my system (gcc-4.4.4, glibc-2.11.1).
> i see diffs in relocations.
> 
> $ readelf -sW a_ok*|grep strchr
>  5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 (2)
> 70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@@GLIBC_2.2.5
> 
> $ readelf -sW a_nok*|grep strchr
>  5: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@GLIBC_2.2.5 (2)
> 69: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@@GLIBC_2.2.5
> 

This is a linker bug. Please report it to Ubuntu. Undefined
functions should never be marked as IFUNC.


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/20

------------------------------------------------------------------------
On 2010-03-29T14:59:34+00:00 Eric CABRET wrote:

OK, I'm going to transfer this problem to Ubuntu.
The linker is GNU ld in package binutils, isn't it ?


(In reply to comment #20)
> (In reply to comment #12)
> > i can confirm that gpf on my system (gcc-4.4.4, glibc-2.11.1).
> > i see diffs in relocations.
> > 
> > $ readelf -sW a_ok*|grep strchr
> >  5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 
> > (2)
> > 70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@@GLIBC_2.2.5
> > 
> > $ readelf -sW a_nok*|grep strchr
> >  5: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@GLIBC_2.2.5 
> > (2)
> > 69: 0000000000601050    41 IFUNC   GLOBAL DEFAULT   26 strchr@@GLIBC_2.2.5
> > 
> 
> This is a linker bug. Please report it to Ubuntu. Undefined
> functions should never be marked as IFUNC.
> 


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/21

------------------------------------------------------------------------
On 2010-03-29T15:01:53+00:00 Hjl-tools wrote:

(In reply to comment #21)
> OK, I'm going to transfer this problem to Ubuntu.
> The linker is GNU ld in package binutils, isn't it ?
> 

There may be 2 linkers. In any case, just report it
to Ubuntu.


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/22

------------------------------------------------------------------------
On 2010-03-29T16:48:52+00:00 Matthias Klose wrote:

only seen with gold (2.20.1). gold from the trunk does work.


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/23

------------------------------------------------------------------------
On 2010-03-29T20:44:06+00:00 Eric CABRET wrote:

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.
> 

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/24

------------------------------------------------------------------------
On 2010-03-29T21:48:11+00:00 Eric CABRET wrote:

I've reported this problem to Ubuntu at this following URL :
https://bugs.launchpad.net/ubuntu/+bug/551245

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/551245/comments/29

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/551245

Title:
  Ubuntu 64bit Lucid Lynx : segmentation fault in strchr() obtained with
  gcc4.4.3 and not with gcc4.4.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/551245/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to