This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 12780 - libf2c shared libs cause core dump
libf2c shared libs cause core dump
Status: CLOSED NOTABUG
Product: Red Hat Powertools
Classification: Retired
Component: f2c (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-06-21 10:03 EDT by mbw8
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-06-23 12:01:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description mbw8 2000-06-21 10:03:42 EDT
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 10:58:24 EDT
Which architecture?
Comment 2 mbw8 2000-06-21 11:44:40 EDT
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 12:01:16 EDT
Do you have the source files  (FORTRAN) you used?
Comment 4 mbw8 2000-06-23 12:58:43 EDT
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.