[haiku-bugs] Re: [Haiku] #10490: Can't screenshoot Web+ under libroot_debug.so

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Wed, 05 Feb 2014 14:43:18 -0000

#10490: Can't screenshoot Web+ under libroot_debug.so
----------------------------------+----------------------------
   Reporter:  humdinger           |      Owner:  axeld
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  R1
  Component:  Kits/Interface Kit  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:1 pulkomandy]:
 > What happens is the LD_PRELOAD is inherited to child processes. In this
 case, it seems the "Screenshot" app ends up being run with the gcc4
 libroot_debug loaded, so it fails to run.

 libroot_debug is just an alternative libroot. Besides that a program might
 run into an assertion or other debug check in case of certain issues, it
 should just work the same way. I suppose the `exception` type info symbol
 should live in libgcc and thus libroot, so it should also live in
 libroot_debug. I checked on a gcc4h image and both (gcc 2) libroot and
 libroot_debug do indeed export the symbol.

 > We may want to at least catch the error and display the error message in
 an alert.

 That would certainly be good.

 > One level deeper, I don't know if be_roster->Launch() should inherit the
 LD_PRELOAD value from the environment.

 Since there's no environment parameter, it inherits the environment of the
 current process. I don't think filtering the environment is generally
 desirable. The caller could instead use `FindApp()` and then
 `launch_image()` manually. Obviously we could also add a `Launch()`
 version with an environment parameter.

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

Other related posts: