#10898: [package_daemon] crash in Volume::HandleGetLocationInfoRequest()
--------------------------------------+---------------------------------
Reporter: diver | Owner: bonefish
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Servers/package_daemon | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking: 11327, 12232, 13539
Has a Patch: 1 | Platform: All
--------------------------------------+---------------------------------
Comment (by pulkomandy):
I'm a bit confused by this patch. Maybe you could explain why it fixes the
problem?
- If isActive is true, we will get state == fActiveState when we get to
the changed lines. If there is also fLatestState == fActiveState as your
patch tests, then the operation results in no change for the latest
package (fLatestState == state by transitivity). So, the whole operation
should be skipped (no change count, no notification).
- If isActive is false, it means the active state is unchanged, and the
latest is being replaced. If the latest was the same as the active, then
we can get into a problem (we will delete the active state while it is
still referenced).
Being unfamiliar with the code, I don't know if such a situation is
expected (latest state changes from "same as active" to "different from
active", but active state remains the same). What are the circumstances
that lead to this happening?
I find the code a bit hard to follow with all these conditions. Maybe I'm
just a little tired today, however.
Overall, +1, but I'd appreciate additional explanations on what is going
on (in ticket comments is ok - no need to update the patch itself)
--
Ticket URL: <https://dev.haiku-os.org/ticket/10898#comment:8>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.