8000 Updated stat interposing by hoytak · Pull Request #413 · xetdata/xet-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Updated stat interposing #413

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

Merged
merged 7 commits into from
Jul 23, 2024
Merged

Updated stat interposing #413

merged 7 commits into from
Jul 23, 2024

Conversation

hoytak
Copy link
@hoytak hoytak commented Jul 19, 2024

This PR:

  • Imports the hook and real macros, modifying them on linux to crash not at initialize time but at runtime when a function that doesn't exist is possibly interposed.
  • Adds full coverage for all the libc and glibc stat functions and variants, also consolidating the stat implementation to a single easier-to-read function.
  • Use statx on linux to determine regular files.

@hoytak hoytak marked this pull request as ready for review July 19, 2024 19:29
@hoytak hoytak requested a review from seanses July 19, 2024 19:29
Copy link
Contributor
@seanses seanses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

}
}

// int __xstat(int ver, const char *pathname, struct stat *buf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document for all the __x* that ver should be 3.

@hoytak hoytak merged commit 4690280 into main Jul 23, 2024
3 checks passed
@hoytak hoytak deleted the hoytak/240718-stat-fixes branch July 23, 2024 22:06
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.

2 participants
0