-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Truncate inode number when writing to st_ino_truncated. NFC #19568
Conversation
This field is designed to hold a potentially truncated inode number, as opposes the st_ino which hold the full 64-bit value. Fixes: #19567
I know you are never supposed to say such things.. but I'm not sure its worth the effort to add a test for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes my issue! thanks!
@@ -52,7 +52,7 @@ var SyscallsLibrary = { | |||
throw e; | |||
} | |||
{{{ makeSetValue('buf', C_STRUCTS.stat.st_dev, 'stat.dev', 'i32') }}}; | |||
{{{ makeSetValue('buf', C_STRUCTS.stat.__st_ino_truncated, 'stat.ino', 'i32') }}}; | |||
{{{ makeSetValue('buf', C_STRUCTS.stat.__st_ino_truncated, 'stat.ino >>> 0', 'i32') }}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What effect does this have? HEAP32[x] = y
will automatically do the effect of |0
to y
as it is written, won't it? Is there some subtle signed/unsigned issue I am missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, is it hitting the recent assertion you added @sbc100 that checks the value fits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup.. nice to see them doing their job!
Closing in favor of #19569 |
This field is designed to hold a potentially truncated inode number, as opposes the st_ino which hold the full 64-bit value.
Fixes: #19567