-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion error in lmm_add_free #1
Comments
I have created PR #2 that fixes this bug. |
What sort of environment are you compiling in? |
I am compiling using GCC 12. The target machine is i386 (Intel, 32 bits, BIOS). This bug is reporducible on real hardware and on QEMU. I found this bug while taking an operating systems class in a university. The class website contains more information about the environment. |
Gotcha, you're still going to have to be very specific. I've got two little kids so I don't have many cycles for deep dives. Can I get your exact command lines to start? both gcc and qemu? |
Also roping in @bford because he's the subject matter expert here. |
The bug is triggered while the lmm library is used by the code provided by my class. Unfortunately this code is not publicly available. I think it is easier to reproduce this bug by running lmm in a Linux process. The source code is in: https://gist.github.com/lxylxy123456/1cb7c1319aaf37373c6712e7cfae35ad I am using GCC 12.2.1, Fedora 37 (Linux kernel 6.0). This program should be able to run on other operating systems. Steps to reproduce:
The program output looks like
Using GDB, the backtrace is:
If you change line 34 from
Please let me know if you need any other information. Than you. |
Excellent, thank you. I'll look at it and merge it when I reproduce it. |
I recently encountered assertion error in the following line in lmm_add_free():
oskit/lmm/lmm_add_free.c
Line 33 in c9e5fcd
This error happens when the caller calls
lmm_add_free(lmm, (void *)0x2345, 2)
. Suppose alignment is 8. Then:min = 0x2345
max = 0x2347
min = 0x2348
max = 0x2340
max >= min
is false (0x2340 >= 0x2348
is false)The text was updated successfully, but these errors were encountered: