Skip to content
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

After adding -g3 compiler option in Makefile, a test in usertests.c doesn't pass #133

Open
ttzytt opened this issue Aug 21, 2022 · 1 comment

Comments

@ttzytt
Copy link

ttzytt commented Aug 21, 2022

This problem was discovered when I used gdb to debug code in one of the labs (to be specific, mmap). Because I want to check the macros, I added the -g3 compiler option in Makefile like this:

CFLAGS = -Wall -Werror -g3 -O -fno-omit-frame-pointer -ggdb # this is line 94

Then I was not able to pass the writebig test in usertest.c. It says:

$ usertests writebig
usertests starting
test writebig: panic: balloc: out of blocks

To make sure that the modification for the lab does not cause this problem, I switched to another branch that hasn't been modified (util), then added the compiler option again. And the previous problem showed up again:

test writebig: panic: balloc: out of blocks

I wasn't sure if this was the right place to add compiler options, because I'm unfamiliar with Makefile. But if this is the place to put compiler options, then it could be a bug.

Hope this is helpful if you met this problem, and if you know why this is happening, please tell me because I'm very curious about this (this is a very unexpected place to affect usertests, and I stuck at this lab for a long time just because of this).

@ttzytt ttzytt changed the title After adding -g3 comiler option in Makefile, a test in usertests.c doesn't pass After adding -g3 compiler option in Makefile, a test in usertests.c doesn't pass Aug 21, 2022
@ttzytt
Copy link
Author

ttzytt commented Aug 21, 2022

My environment is an Ubuntu 22.04.1 LTS running on WSL2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant