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

Use checked arithmetic for addition to Unix epoch. #231

Closed
wants to merge 1 commit into from

Conversation

trombonehero
Copy link

The current code can panic with filesystems that do not store times. Using checked arithmetic allows such filesystems to operate without panic.

The current code can panic with filesystems that do not store times.
Using checked arithmetic allows such filesystems to operate without
panic.
@cberner
Copy link
Owner

cberner commented Feb 25, 2023

I'm not sure this is the right fix. That code path is only taken when the appropriate FATTR_CRTIME...etc flag is set. Do you know why that flag is getting set without a valid timestamp passed in?

@trombonehero
Copy link
Author

This is happening (at least for me on macOS) when sending FileAttr to a ReplyEntry with SystemTime::now() and a TTL of 1s.

I wonder if this is also related to #217?

cloud-fs added a commit to cloud-fs/fuser that referenced this pull request Apr 11, 2023
@FirelightFlagboy
Copy link
Contributor

FirelightFlagboy commented Nov 25, 2024

Hello, I'm having an issue that would be solved by this PR.

I've done some investigation and I think the issue lies on macFuse side: macfuse/macfuse#1042

@cberner, could this PR be merged ? Or does it require additional work ?

I've tested the patch and it fix the issue I'm having

@cberner
Copy link
Owner

cberner commented Nov 27, 2024

Going to close this in favor of #322

@cberner cberner closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants