Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1556716 Details for
Bug 1701694
subroutine call traceback via libunwind on aarch64 (arm64) is not robust
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch aarch64/Ginit.c to avoid many SIGSEGV
libunwind-aarch64.patch (text/plain), 1.76 KB, created by
John Reiser
on 2019-04-20 19:39:14 UTC
(
hide
)
Description:
patch aarch64/Ginit.c to avoid many SIGSEGV
Filename:
MIME Type:
Creator:
John Reiser
Created:
2019-04-20 19:39:14 UTC
Size:
1.76 KB
patch
obsolete
>--- src/aarch64/Ginit.c.orig 2019-04-20 11:07:52.438612959 -0700 >+++ src/aarch64/Ginit.c 2019-04-20 12:17:55.629682925 -0700 >@@ -82,17 +82,47 @@ > return 0; > } > >-static int >+/* Heurstic to avoid SIGSEGV at bad address. Assume that a valid 64-bit >+ * address must have 0x0000 or 0xffff as its most significant 16 bits. >+ * Sign-extended right shift by 48 produces all 0-bits or all 1-bits, >+ * and the negative of that will be 0 or 1. >+ */ >+static unsigned >+bad_hibits(void const *addr) >+{ >+ long x = (long)addr; >+ return 1 < (unsigned long)-(x >> 48); >+} >+ >+static int /* returns 0: OK; -1: addressing error was avoided */ > access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, > void *arg) > { > if (write) > { >+ if (bad_hibits((void const *)addr)) { >+ Debug (16, "mem[BAD %lx] <- *%lx\n", addr, val); >+ return -1; /* Write into out-of-bounds address */ >+ } >+ if (bad_hibits((void const *)val)) { >+ Debug (16, "mem[%lx] <- ZERO (*BAD %lx)\n", addr, val); >+ *(unw_word_t *) addr = 0; /* pretend out-of-bounds is 0 */ >+ return -1; /* Write from out-of-bounds address */ >+ } > Debug (16, "mem[%lx] <- %lx\n", addr, *val); > *(unw_word_t *) addr = *val; > } >- else >+ else /* Read */ > { >+ if (bad_hibits((void const *)val)) { >+ Debug (16, "mem[%lx] -> *BAD %lx\n", addr, val); >+ return -1; /* Read into out-of-bounds address */ >+ } >+ if (bad_hibits((void const *)addr)) { >+ Debug (16, "mem[BAD %lx] -> ZERO (*%lx)\n", addr, *val); >+ *val = 0; /* pretend out-of-bounds is 0 */ >+ return -1; /* Read from out-of-bounds address */ >+ } > *val = *(unw_word_t *) addr; > Debug (16, "mem[%lx] -> %lx\n", addr, *val); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1701694
: 1556716