libbpf-rs
libbpf-rs copied to clipboard
Problems with internal maps (.rodata) and old kernels
Found some problems with >= libbpf-sys 0.6.0 and old kernels (in my case it was CentOS/RHEL 7). The problems were with internal maps (.rodata) generated (but not really used) by a relatively new compiler.
What I found:
- double free in the error path that actually resulted in segfault
- after getting rid of the segfault there remains an error with loading such programs
Thanks for finding this and submitting a fix! I left a comment in your 2nd commit but other than that, this makes sense to me!
Hey, I'm still interested in fixing this. Could you give me a clearer indication on what needs to change? Do you all agree on removing the fd < 0
check completely? Or maps with -1 fd should be filtered out instead of causing error? Or something else entirely?
Thanks for following up @trtt! imo the consensus is that if fd < 0 then we should skip it.
Thanks for following up @trtt! imo the consensus is that if fd < 0 then we should skip it.
done
+1
This pull request is considered stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 5 days.
Closing pull request as it is stale.