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

  • From: "cdurrett" <trac@xxxxxxxxxxxx>
  • Date: Thu, 06 Aug 2015 12:19:30 -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
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
-------------------------------------+----------------------------

Comment (by cdurrett):

Ascend with me to flight level 300. :-)

The simplest program should work. This program for example.

; s.a
section .text
global _start
_start: ret

If in the terminal I

yasm -f elf s.a
ld -s -o s s.o
./s

Program 's' should do nothing - except to get loaded and executed by
runtime_loader.

In all the effort done to support and optimize "shared object programs"
with "dynamic sections", this simplest case looks like it was
inadvertently overlooked sometime after December 2008.

I've made the less-than-one-line change mentioned in the ticket and
restored the handling of the simplest case. The change also protects
runtime_loader from abending in an allocation routine and thus becoming an
attack vector to the rest of the OS.

Charles

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

Other related posts: