Skip to content

tests/ssp: Fix on macOS while compiling w/ clang#7777

Merged
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
x3ro:fix-ssp-test-on-macos
Oct 31, 2017
Merged

tests/ssp: Fix on macOS while compiling w/ clang#7777
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
x3ro:fix-ssp-test-on-macos

Conversation

@x3ro
Copy link
Copy Markdown
Contributor

@x3ro x3ro commented Oct 20, 2017

On macOS using Apple LLVM version 9.0.0 this test would
not compile due to clang detecting the buffer overflow.
Since this test is all about having a buffer overflow, I
tricked clang into not detecting this anymore.

This loosely relates to #6473.

@x3ro x3ro added the OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system label Oct 20, 2017
Copy link
Copy Markdown
Member

@jnohlgard jnohlgard left a comment

Choose a reason for hiding this comment

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

Looks fine, except for the comment style. I wonder how long it will be until an improved bounds check in clang catches this workaround 😊

tests/ssp/main.c Outdated
{
char buf[16];

// clang will detect the buffer overflow
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change this to c style comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ping @x3ro?

@kYc0o kYc0o added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 25, 2017
@kYc0o kYc0o mentioned this pull request Oct 25, 2017
7 tasks
On macOS using Apple LLVM version 9.0.0 this test would
not compile due to clang detecting the buffer overflow.
Since this test is all about having a buffer overflow, I
tricked clang into not detecting this anymore.

This loosely relates to #6473.
@x3ro x3ro force-pushed the fix-ssp-test-on-macos branch from dd8fd10 to 4710701 Compare October 30, 2017 09:54
@x3ro
Copy link
Copy Markdown
Contributor Author

x3ro commented Oct 30, 2017

Comment style changed :)

@jnohlgard jnohlgard merged commit 4de06b5 into RIOT-OS:master Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants