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
syscall detection is broken in meson build #21375
Comments
Good finding! This needs to be implemented for meson indeed. Funny that after 4 years of introducing meson we are still missing things that are handled properly with make! Thanks for reporting! I'll take a look at it |
…uild * Like it's with with the make build system
…uild * Like it's with with the make build system
Can you please try the PR and check if its behaving as expected? |
Thanks it works. |
Sorry, I am not sure it's complete. When passing an arm 64 binary (I suppose syscalls DB choice is automatic):
Also:
(linux-arm-64.sdb.txt.tmp is generated, and not removed, by gen.py). Not sure what's the significance of the extra commas. |
Reopening, for visibility. |
Well, I can't see how. @trufae Would you like me to open a separate issue? I didn't check all archs - linux_x86_64 seems ok, linux_arm_64 seems still broken. Thanks. |
At least from the SDB point of view it looks ok for arm64:
|
I didn't check arm 32, might have the same or a similar issue. Not sure what the output of sdb means and how it should look for radare2 to work well. See my previous comment for what I did check. Do the extra commas added by gen.sh have any significance? Apparently yes. If so, perhaps the py version should add them as well. I don't mind pushing a patch to add this myself, but would feel uneasy doing this without a deeper understanding of the formats of these files, what these commas mean, etc., and learning all of this will take more time, to me - I hope @trufae can answer more easily... |
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Environment
This is a fedora 37 container (on a RHEL 8 machine, probably irrelevant), using the radare2 build of fedora. At first I thought it's a packaging bug in fedora, thus reported it at https://bugzilla.redhat.com/show_bug.cgi?id=2170036 , but further investigation might imply it's a general bug in the meson build, thus current report.
Description
syscalls detection does not work, apparently because the way the meson build generates the syscall *.sdb files is broken.
Test
Do a meson build - e.g. something like:
Fedora's spec file is here, for reference:
https://src.fedoraproject.org/rpms/radare2/blob/rawhide/f/radare2.spec
Using such a build, run e.g.:
The github linux-static build (using make) does work well on the same machine. Checking the logs of both runs:
Fedora:
https://koji.fedoraproject.org/koji/taskinfo?taskID=97322791
github (a recent master build picked randomly, can't find in github the action for a specific tag):
https://github.com/radareorg/radare2/actions/runs/4127735691/jobs/7131308671
The make/github build calls
gen.sh
on the text file, which "duplicates" it - adds the "opposite" direction, AFAIU - the text file stores "ftruncate=0x80,77,2," and gen.sh adds "0x80.77=ftruncate", for the above example. The meson build does not.A somewhat shallow further checking of the git log hints that this might have been a regression which was part of 657524a. If so, perhaps parts of this should be reverted.
Thanks!
The text was updated successfully, but these errors were encountered: