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

Check .sym file reported addresses and sorting #1350

Closed
Rangi42 opened this issue Mar 10, 2024 · 4 comments · Fixed by #1352
Closed

Check .sym file reported addresses and sorting #1350

Rangi42 opened this issue Mar 10, 2024 · 4 comments · Fixed by #1352
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgblink This affects RGBLINK
Milestone

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Mar 10, 2024

From pinobatch:

I'm noticing some strange overlaps when building 144p Test Suite using RGBDS master. RGBDS 0.7.0 builds it correctly.
The tools are reporting their version as v0.7.0-200-g846a9411
All these symbols show up as $0100 for some reason
$0100 = vwfPutBufHBlank.nondraw
$0100 = sgb_sound_draw_values.do3rows
SECTION: $0100-$014f ($0050 bytes) ["header"]
Repository is https://github.com/pinobatch/240p-test-mini, at HEAD of master

Also, when two SECTION UNIONs put the same symbol at the same address (but not exporting them), macOS CI sorts the .sym file differently.

@Rangi42 Rangi42 added bug Unexpected behavior / crashes; to be fixed ASAP! rgblink This affects RGBLINK labels Mar 10, 2024
@Rangi42 Rangi42 added this to the v0.7.1 milestone Mar 10, 2024
@pinobatch
Copy link
Member

It gets worse: look at all the different sections that get mapped to $0018.
gb240p.map
gb240p.sym

pinobatch added a commit to pinobatch/libbet that referenced this issue Mar 11, 2024
To troubleshoot recent RGBLINK builds that allow some other section
to overlap the header section.
<gbdev/rgbds#1350>
@pinobatch
Copy link
Member

I set up a bisection

# set the boundaries
git checkout master
git bisect start
make clean && make -j3
# build libbet in other terminal
git bisect bad
git checkout v0.7.0
# HEAD is detached
make clean && make -j3
# build libbet in other terminal
git bisect good

In the other terminal, I was running this command

make clean && make -j3 libbet.gb RGBDS=/home/pino/develop/assemblers/rgbds/ && sameboy libbet.gb

Result: #1323 broke it

446fb07fd5ea651557ef86eb54b5f93f06a204dd is the first bad commit
commit 446fb07fd5ea651557ef86eb54b5f93f06a204dd
Author: Sylvie <35663410+Rangi42@users.noreply.github.com>
Date:   Fri Mar 1 16:21:29 2024 -0500

    Use `std::deque<std::vector>` for free space (#1323)

Log:

# status: waiting for both good and bad commits
# bad: [846a9411b9ea0676bdc4b7dc6ac89c98020af8af] Refactor `FileStackNode::dump` to not need a helper function
git bisect bad 846a9411b9ea0676bdc4b7dc6ac89c98020af8af
# status: waiting for good commit(s), bad commit known
# good: [08f3e360c9525b65291db9cee66fc5eb6e4a45e4] Release v0.7.0
git bisect good 08f3e360c9525b65291db9cee66fc5eb6e4a45e4
# good: [962398969bfe492e10b92205641800b70af63bd6] Use `std::string` for `PURGE` args
git bisect good 962398969bfe492e10b92205641800b70af63bd6
# bad: [ba183e900b4550d2040c5e255bef27c8b8861ee8] Update contributors
git bisect bad ba183e900b4550d2040c5e255bef27c8b8861ee8
# good: [eff8c324c8547c476f29cb49585cc9f47541b0fe] Remove now-unnecessary `struct` keyword (#1320)
git bisect good eff8c324c8547c476f29cb49585cc9f47541b0fe
# bad: [dbcb82799e197cd247e03df4a34b97cc8e0ab95d] Use `std::vector` for capture buffer
git bisect bad dbcb82799e197cd247e03df4a34b97cc8e0ab95d
# bad: [701b926288959be18f881ad919ce61580701ec59] Use RAII `std::string` and `std::vector` in randtilegen (#1325)
git bisect bad 701b926288959be18f881ad919ce61580701ec59
# good: [e14ba664ea5615d18ff22c3054311d204ba81315] Remove redundant `(void)` parameter declarations
git bisect good e14ba664ea5615d18ff22c3054311d204ba81315
# bad: [446fb07fd5ea651557ef86eb54b5f93f06a204dd] Use `std::deque<std::vector>` for free space (#1323)
git bisect bad 446fb07fd5ea651557ef86eb54b5f93f06a204dd
# good: [1ac3c0262f16076b289a61535d924cac38bd1bee] Refactor structs to use methods instead of functions (#1322)
git bisect good 1ac3c0262f16076b289a61535d924cac38bd1bee
# first bad commit: [446fb07fd5ea651557ef86eb54b5f93f06a204dd] Use `std::deque<std::vector>` for free space (#1323)

@Rangi42
Copy link
Contributor Author

Rangi42 commented Mar 11, 2024

anyone want to debug that?

@Rangi42
Copy link
Contributor Author

Rangi42 commented Mar 12, 2024

or, does anyone have a minimal example that gives a different ROM after that commit? My tests with a few floating sections are still the same (although the .sym file is sorted differently/wrongly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgblink This affects RGBLINK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants