[haiku-bugs] [Haiku] #12287: runtime_loader GetSymbolCache has invalid implicit assumption

  • From: "cdurrett" <trac@xxxxxxxxxxxx>
  • Date: Tue, 04 Aug 2015 12:51:59 -0000

#12287: runtime_loader GetSymbolCache has invalid implicit assumption
-----------------------------------+------------------------------
Reporter: cdurrett | Owner: bonefish
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: System/runtime_loader | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-----------------------------------+------------------------------
Bug because code assumes ELF being loaded was made with GCC. A yasm ELF
file now fails with a segment/memory exception.

Line 61 (in current github source) in file elf_symbol_lookup.h reads:

fTableSize(image->symhash[1]),

If it is changed to read:

fTableSize(image->symhash ? image->symhash[1] | 0),

the bug goes away.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12287>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: