We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi I got this simple test file when debugging the issue 36:
#include <stdio.h> #include <unistd.h> #include <sys/mman.h> #include <sys/stat.h> // struct stat #include <fcntl.h> // O_RDONLY void print_stat(struct stat sbuf) //void print_stat(struct stat *sbuf) { printf(">> stat sbuf.st_mode: 0x%x\n", sbuf.st_mode); //printf("stat sbuf.st_mode: 0x%x\n", sbuf->st_mode); } int main(int argc, char *argv[]) { struct stat sbuf; int fd = open("fstat.c", O_RDONLY, 0); if (fd < 0) { printf("error"); return 1; } fstat(fd, &sbuf); printf("stat sbuf.st_mode: 0x%x\n", sbuf.st_mode); printf("sizeof(struct stat): %lu, %lu\n", sizeof(sbuf), sizeof(struct stat)); print_stat(sbuf); //print_stat(&sbuf); close(fd); return 0; }
For some reason, it has the following results (the value of st_mode is changed):
st_mode
$ ./2_x86-64 stat sbuf.st_mode: 0x81a4 sizeof(struct stat): 128, 128 >> stat sbuf.st_mode: 0x3a297461
popcorn-compiler: from commit 4ffd16e, patched with the code from issue 36.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem description
Hi I got this simple test file when debugging the issue 36:
For some reason, it has the following results (the value of
st_mode
is changed):Environment
popcorn-compiler: from commit 4ffd16e, patched with the code from issue 36.
The text was updated successfully, but these errors were encountered: