* miscfuncs.cc (__import_address): Cover the first dereference to imp
under the fault handler.
This commit is contained in:
parent
b1f81c3b71
commit
33ed7bb5bc
|
@ -1,3 +1,8 @@
|
||||||
|
2014-08-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* miscfuncs.cc (__import_address): Cover the first dereference to imp
|
||||||
|
under the fault handler.
|
||||||
|
|
||||||
2014-08-21 Corinna Vinschen <corinna@vinschen.de>
|
2014-08-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* net.cc (if_freenameindex): Don't catch a SEGV from free to fail
|
* net.cc (if_freenameindex): Don't catch a SEGV from free to fail
|
||||||
|
|
|
@ -512,11 +512,11 @@ slashify (const char *src, char *dst, bool trailing_slash_p)
|
||||||
void * __reg1
|
void * __reg1
|
||||||
__import_address (void *imp)
|
__import_address (void *imp)
|
||||||
{
|
{
|
||||||
if (*((uint16_t *) imp) != 0x25ff)
|
|
||||||
return NULL;
|
|
||||||
myfault efault;
|
myfault efault;
|
||||||
if (efault.faulted ())
|
if (efault.faulted ())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
if (*((uint16_t *) imp) != 0x25ff)
|
||||||
|
return NULL;
|
||||||
const char *ptr = (const char *) imp;
|
const char *ptr = (const char *) imp;
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
const uintptr_t *jmpto = (uintptr_t *) (ptr + 6 + *(int32_t *)(ptr + 2));
|
const uintptr_t *jmpto = (uintptr_t *) (ptr + 6 + *(int32_t *)(ptr + 2));
|
||||||
|
|
Loading…
Reference in New Issue