Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
[sanitizer] Fix typo that breaks shmctl() interceptor.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenis committed Jan 30, 2014
1 parent fce5d11 commit f276ed8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/asan/lit_tests/TestCases/Linux/shmctl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ int main() {
printf("shm_segsz: %zd\n", ds.shm_segsz);
assert(ds.shm_segsz == 4096);
assert(-1 != shmctl(id, IPC_RMID, 0));

struct shm_info shmInfo;
res = shmctl(0, SHM_INFO, (struct shmid_ds *)&shmInfo);
assert(res > -1);

return 0;
}
2 changes: 1 addition & 1 deletion lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ namespace __sanitizer {
int shmctl_ipc_stat = (int)IPC_STAT;
int shmctl_ipc_info = (int)IPC_INFO;
int shmctl_shm_info = (int)SHM_INFO;
int shmctl_shm_stat = (int)SHM_INFO;
int shmctl_shm_stat = (int)SHM_STAT;
#endif

int map_fixed = MAP_FIXED;
Expand Down

0 comments on commit f276ed8

Please sign in to comment.