Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37890 - efence won't emerge
Summary: efence won't emerge
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 47403 53559 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-11 08:16 UTC by Thomas Johnson
Modified: 2004-09-16 14:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Bug Fix (efence-fixtest.diff,413 bytes, patch)
2004-09-16 14:28 UTC, Arnaud
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Johnson 2004-01-11 08:16:11 UTC
emerging efence fails with a segfault

Reproducible: Always
Steps to Reproduce:
Just 'emerge efence'
Actual Results:  
# emerge efence
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-util/efence-2.2.2 to /
>>> md5 src_uri ;-) ElectricFence-2.2.2.tar.gz
>>> Unpacking source...
>>> Unpacking ElectricFence-2.2.2.tar.gz to /var/tmp/portage/efence-2.2.2/work
>>> Source unpacked.
gcc -g -DUSE_SEMAPHORE -fPIC  -c efence.c -o efence.o
gcc -g -DUSE_SEMAPHORE -fPIC  -c page.c -o page.o
gcc -g -DUSE_SEMAPHORE -fPIC  -c print.c -o print.o
gcc -g -DUSE_SEMAPHORE -fPIC  -c tstheap.c -o tstheap.o
print.c: In function `EF_Printv':
print.c:114: warning: `char' is promoted to `int' when passed through `...'
print.c:114: warning: (so you should pass `int' not `char' to `va_arg')
gcc -g -DUSE_SEMAPHORE -fPIC  -c eftest.c -o eftest.o
rm -f libefence.a
ar crv libefence.a efence.o page.o print.o
a - efence.o
a - page.o
a - print.o
gcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
        efence.o page.o print.o -lpthread -lc
rm -f tstheap
gcc -g -DUSE_SEMAPHORE -fPIC tstheap.o libefence.a -o tstheap -lpthread
libefence.a(page.o)(.text+0x30): In function `stringErrorReport':
/var/tmp/portage/efence-2.2.2/work/ElectricFence-2.2.2/page.c:46: warning:
`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
libefence.a(page.o)(.text+0x24):/var/tmp/portage/efence-2.2.2/work/ElectricFence-2.2.2/page.c:45:
warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
rm -f eftest
gcc -g -DUSE_SEMAPHORE -fPIC eftest.o libefence.a -o eftest -lpthread
libefence.a(page.o)(.text+0x30): In function `stringErrorReport':
/var/tmp/portage/efence-2.2.2/work/ElectricFence-2.2.2/page.c:46: warning:
`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
libefence.a(page.o)(.text+0x24):/var/tmp/portage/efence-2.2.2/work/ElectricFence-2.2.2/page.c:45:
warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
 
Testing Electric Fence.
After the last test, it should print that the test has PASSED.
./eftest
 
  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
make: *** [all] Segmentation fault
 
!!! ERROR: dev-util/efence-2.2.2 failed.
!!! Function src_compile, Line 20, Exitcode 2
!!! (no error message)



If it matters, I'm using gcc 3.2.3-r3
Comment 1 SpanKY gentoo-dev 2004-01-11 13:22:07 UTC
i looked into this once and i think the answer is 'dont even bother'
it died horribly for me on newer glibc/gcc systems ... and the fact that it hasnt be updated in YEARS should be enough to make you want to use valgrind

in other words, i vote to close this bug as UPSTREAM and just tell users to use valgrind ;)
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2004-01-13 06:22:07 UTC
maybe this should be completly removed from portage tree
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2004-01-17 03:03:04 UTC
I think it's still useful to have it in the tree for systems where it does
work.  I agree with Spanky though that we should close it as UPSTREAM since
there's really not much we can do about it.

I'm going to go ahead and do just that as a matter of fact.  We can use this
bug as a metabug for future efence bugs if necessary.
Comment 4 SpanKY gentoo-dev 2004-04-19 11:44:17 UTC
*** Bug 47403 has been marked as a duplicate of this bug. ***
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2004-06-10 12:51:48 UTC
*** Bug 53559 has been marked as a duplicate of this bug. ***
Comment 6 Arnaud 2004-09-16 14:28:31 UTC
Created attachment 39718 [details, diff]
Bug Fix
Comment 7 Arnaud 2004-09-16 14:49:33 UTC
Comment on attachment 39718 [details, diff]
Bug Fix

diff -uNr ElectricFence-2.2.2-orig/eftest.c ElectricFence-2.2.2/eftest.c
--- ElectricFence-2.2.2-orig/eftest.c	1995-01-20 05:54:30.000000000 +0100
+++ ElectricFence-2.2.2/eftest.c	2004-09-16 23:35:42.337147736 +0200
@@ -40,13 +40,13 @@
 )
  {
	signal(PAGE_PROTECTION_VIOLATED_SIGNAL, SIG_DFL);
-	longjmp(env, 1);
+	siglongjmp(env, 1);
 }

 static int
 gotSegmentationFault(int (*test)(void))
 {
-	if ( setjmp(env) == 0 ) {
+	if ( sigsetjmp(env, 1) == 0 ) {
		int			status;

		signal(PAGE_PROTECTION_VIOLATED_SIGNAL