Re: Which signal occurs due to a page protection violation?

From: Sam Lawrance <boris_at_brooknet.com.au>
Date: Wed, 8 Feb 2006 15:15:02 +1100
[ moved to -current ]

On 01/02/2006, at 6:41 AM, Jason Evans wrote:

> On Jan 31, 2006, at 1:06 AM, Sam Lawrance wrote:
>> ElectricFence is failing during its self test on i386 7-current:
>>
>> Testing Electric Fence.
>> After the last test, it should print that the test has PASSED.
>> EF_PROTECT_BELOW= && EF_PROTECT_FREE= && EF_ALIGNMENT= && ./eftest
>> Segmentation fault (core dumped)
>> *** Error code 139
>>
>> The program intentionally overruns and underruns buffers in order  
>> to test the functionality of ElectricFence.
>> I think it's failing because:
>> 1) the new jemalloc is actually catching the problem and throwing  
>> SIGSEGV
>> 2) ElectricFence is being compiled with - 
>> DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS on that platform.
>
> I'm not sure about this, but I think the change of which signal  
> occurs is unrelated to jemalloc.  I think Kris Kennaway at one  
> point told me that jemalloc broke the efence port, but then later  
> retracted that claim when efence also failed on a machine that was  
> still using phkmalloc.  This may be due to a signal delivery bugfix  
> that someone put in, probably in early December 2005.

You are right.  The change below delivers SIGSEGV instead of SIGBUS  
(also on amd64).

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/trap.c? 
annotate=1.282
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/amd64/amd64/trap.c.diff? 
r1=1.294&r2=1.295&f=h

David, was this an intentional change?  It broke ElectricFence, which  
depended on the old behaviour.  The 4.x, 5.x, and 6.x package builds  
are hosted on machines running -current, so ElectricFence self tests  
will fail in that environment.

I haven't seen any other fallout from this change.  However, binaries  
depending on the old behaviour may have issues with backward  
compatibility.
Received on Wed Feb 08 2006 - 03:15:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC