Suppress UBSan false positives.
Function pointers from exported functions are wrongly flagged as being
of incorrect type. This happens both on libEGL and libGLESv2 entry
functions, as well as functions called between them.
Bug chromium:746914
Change-Id: I2bf5a8f06546c233ede7a4820c0cda3e997f096e
Reviewed-on: https://swiftshader-review.googlesource.com/10868
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Main/FrameBufferX11.cpp b/src/Main/FrameBufferX11.cpp
index 12b83e4..a065198 100644
--- a/src/Main/FrameBufferX11.cpp
+++ b/src/Main/FrameBufferX11.cpp
@@ -123,7 +123,7 @@
void FrameBufferX11::unlock()
{
- locked = 0;
+ locked = nullptr;
}
void FrameBufferX11::blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride)
@@ -143,7 +143,7 @@
}
}
-sw::FrameBuffer *createFrameBuffer(void *display, Window window, int width, int height)
+NO_SANITIZE_FUNCTION sw::FrameBuffer *createFrameBuffer(void *display, Window window, int width, int height)
{
return new sw::FrameBufferX11((::Display*)display, window, width, height);
}