-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[compiler-rt] Fix #122795 for solaris platforms proposal. #122956
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
Conversation
@llvm/pr-subscribers-compiler-rt-sanitizer Author: David CARLIER (devnexen) ChangesFull diff: https://github.com/llvm/llvm-project/pull/122956.diff 2 Files Affected:
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
index dad7bde1498a7a..7ea6134b702bf7 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
@@ -32,6 +32,7 @@
#include <semaphore.h>
#include <signal.h>
#include <stddef.h>
+#include <stdio.h>
#include <sys/ethernet.h>
#include <sys/filio.h>
#include <sys/ipc.h>
@@ -135,6 +136,8 @@ namespace __sanitizer {
unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);
+ unsigned fpos_t_sz = sizeof(fpos_t);
+
const unsigned IOCTL_NOT_PRESENT = 0;
unsigned IOCTL_FIOASYNC = FIOASYNC;
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
index 84a81265162c65..bf6586d27228fb 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
@@ -418,6 +418,8 @@ extern unsigned struct_winsize_sz;
extern unsigned struct_sioc_sg_req_sz;
extern unsigned struct_sioc_vif_req_sz;
+extern unsigned fpos_t_sz;
+
// ioctl request identifiers
// A special value to mark ioctls that are not present on the target platform,
|
Let me know if that s fine with you or you prefer another solution (e.g. not intercepting fseek at all for solaris) or taking care of it yourself. cheers. |
You can test this locally with the following command:git-clang-format --diff dac06e76e0c12a89b750440b4c9a04c68f6baa48 0c8aba36dd4dc34ed03acb8d38b424f35899cef6 --extensions cpp,h -- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h View the diff from clang-format here.diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
index 7ea6134b70..8deebb0693 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp
@@ -32,32 +32,32 @@
#include <semaphore.h>
#include <signal.h>
#include <stddef.h>
-#include <stdio.h>
-#include <sys/ethernet.h>
-#include <sys/filio.h>
-#include <sys/ipc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/mtio.h>
-#include <sys/ptyvar.h>
-#include <sys/resource.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <sys/time.h>
-#include <sys/timeb.h>
-#include <sys/times.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <termios.h>
-#include <time.h>
-#include <utmp.h>
-#include <utmpx.h>
-#include <wchar.h>
-#include <wordexp.h>
+# include <stdio.h>
+# include <sys/ethernet.h>
+# include <sys/filio.h>
+# include <sys/ipc.h>
+# include <sys/mman.h>
+# include <sys/mount.h>
+# include <sys/mtio.h>
+# include <sys/ptyvar.h>
+# include <sys/resource.h>
+# include <sys/shm.h>
+# include <sys/socket.h>
+# include <sys/sockio.h>
+# include <sys/stat.h>
+# include <sys/statfs.h>
+# include <sys/statvfs.h>
+# include <sys/time.h>
+# include <sys/timeb.h>
+# include <sys/times.h>
+# include <sys/types.h>
+# include <sys/utsname.h>
+# include <termios.h>
+# include <time.h>
+# include <utmp.h>
+# include <utmpx.h>
+# include <wchar.h>
+# include <wordexp.h>
// Include these after system headers to avoid name clashes and ambiguities.
#include "sanitizer_internal_defs.h"
|
Does this mean that solaris is |
Yes ideally the platform posix should take care of all posix things then the os specifics take care of native parts but I guess it s complicated unfortunately. |
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.
LGTM from sanitizer perspective but let's wait for Solaris reply as well
AFAIK even freebsd fails now needs to fix it too. |
Ah, so what was actually wrong in the original CL was the |
I myself forgot about this :) In fact only linux/android and macos uses the posix compile unit. |
Right: file naming has always been a nightmare inside |
I've now successfully tested the patch on both |
Can you please update the description for that? For one, please use |
9915498
to
f7d4bf5
Compare
…oposal. To fix llvm#122795 failure for these.
f7d4bf5
to
0c8aba3
Compare
Any reason you ignored this? The current description is a lie. |
Sorry: both the mail and github still showed the old summary, while the commit got it right. What a mess... Btw., please omit |
No description provided.