Ticket #1672 (closed bug: fixed)
Bootmenu triggers reboot
| Reported by: | marcusoverhagen | Owned by: | axeld |
|---|---|---|---|
| Priority: | blocker | Milestone: | R1/alpha1 |
| Component: | System/Boot Loader | Version: | R1 development |
| Cc: | Blocked By: | ||
| Platform: | All | Blocking: |
Description
Entering the Haiku bootmenu triggers a reboot after leaving it. On my machine this has always been reproducible.
I've tracked down an access to a destroyed Partition object by the boot loader in src/system/boot/loader/loader.cpp
load_modules(stage2_args *args, Directory *volume) does
// iterate over the mounted volumes and load their file system
Partition *partition;
if (gRoot->GetPartitionFor(volume, &partition) == B_OK) {
while (partition != NULL) {
load_module(volume, partition->ModuleName());
partition = partition->Parent();
}
}
This partition pointer gets invalid and triggers a reboot, because Parent() does return an object that has been destroyed before the boot menu was shown. Thus the object has been overwritten by the boot menu code.
This can be seen in haikupartitions2.txt, the pointer is 0x0010971c
This problem doesn't seem to happen at all when not entering the bootmenu, see haikupartitions1.txt for reference.
