containers / composefs

a file system for mounting container images
GNU General Public License v2.0
424 stars 29 forks source link

erofs: Handle error from lcfs_build_node_from_image() #260

Closed eriksjolund closed 6 months ago

eriksjolund commented 6 months ago

Adding checks for errors in lcfs_build_node_from_image() return value.

(I marked this as a draft because I haven't traversed the different code paths yet)

eriksjolund commented 6 months ago

I've now read through the different code paths. Looks correct to me too.

cgwalters commented 6 months ago

Hmm, unit tests are hitting

AddressSanitizer:DEADLYSIGNAL and hanging, which is not a good sign...but not sure it's related.

alexlarsson commented 6 months ago

This looks right to me to. And it seems the second unit test passed. However, I'm unable to open the failing first test logs, it just keeps spinning when I expand the "Unit test" section...

@cgwalters Where did you see the errno preservation issues?

I wish there was some kind of gcc attribute for "sets errno".

alexlarsson commented 6 months ago

Ah, eventually it opened the log with a ton of DEADLYSIGNAL. I've never seen that before though, seems like something weird.

alexlarsson commented 6 months ago

I did some manual tests with asan, as well as with valgrind, and I got nothing. And anyway, its unlikely that any code in this PR got executed it the tests anyway (as its only changes error codepaths), so I doubt it was related. Lets get this in.

alexlarsson commented 6 months ago

I wonder if the signal is just ASAN blocking the kill signal that the test gets from the test being cancelled? (For a new run)