Bug 12780 - libf2c shared libs cause core dump
Summary: libf2c shared libs cause core dump
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Powertools
Classification: Retired
Component: f2c
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-06-21 14:03 UTC by mbw8
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-06-23 16:01:18 UTC
Embargoed:


Attachments (Terms of Use)

Description mbw8 2000-06-21 14:03:42 UTC
Can link using libf2c.a but not libf2c.so

f2c-19991109-2
egcs-1.1.2-30
glibc-2.1.3-15 

The test program should print a zero. 

[matt@cr14205-a:~/f2c-test]$ f2c bar.f foo.f
bar.f:
   MAIN bar:
foo.f:
   mysub:
[matt@cr14205-a:~/f2c-test]$ gcc -c foo.c bar.c
[matt@cr14205-a:~/f2c-test]$ gcc -lf2c -lm foo.o bar.o -o main
[matt@cr14205-a:~/f2c-test]$ ./main
Segmentation fault (core dumped)                
[matt@cr14205-a:~/f2c-test]$ gcc  foo.o bar.o -o main /usr/lib/libf2c.a
[matt@cr14205-a:~/f2c-test]$ ./main
  0.           
[matt@cr14205-a:~/f2c-test]$ gcc foo.o bar.o -o main -lg2c
[matt@cr14205-a:~/f2c-test]$ ./main
  0.

It would appear that the core dump occurs in l_write(); this is from gdb

Program received signal SIGSEGV, Segmentation fault.
0x40029086 in l_write () from /usr/lib/libf2c.so.0
(gdb) list
1       rtld.c: No such file or directory.

Comment 1 Trond Eivind Glomsrxd 2000-06-21 14:58:24 UTC
Which architecture?

Comment 2 mbw8 2000-06-21 15:44:40 UTC
ARCH=i686; I am running a dual P3 upgraded to rh 6.2; uname -a reports

Linux cr14205-a 2.2.16 #1 SMP Mon Jun 12 16:05:28 EDT 2000 i686 unknown  

I have seen this error since 6.0; I patched my own version of fort77 to use
-lg2c instead of -lf2c (with unknown side effects)

Comment 3 Trond Eivind Glomsrxd 2000-06-23 16:01:16 UTC
Do you have the source files  (FORTRAN) you used?

Comment 4 mbw8 2000-06-23 16:58:43 UTC
Sorry, my error. I had crufty legacy code with a bounds violation in the
subroutine.


Note You need to log in before you can comment on or make changes to this bug.