Address Sanitizer option “-fsanitize-recover=address” is not supported
I am trying to use Address Sanitizer with gcc in my project.
So, I added the required flags in compiler as well as linker :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fno-omit-frame-pointer)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
Address Sanitizer is working after this, but it aborts my application after the first error. I want the Address Sanitizer to continue running even after reporting the error. So, I added one more flag like below (as per the link https://github.com/google/sanitizers/wiki/AddressSanitizer) :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer)
After this I am getting the error that this recover flag is not supported :
Problems were encountered while collecting compiler information:
cc1plus: error: -fsanitize-recover=address is not supported
PS : My gcc version is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
gcc cmake address-sanitizer
add a comment |
I am trying to use Address Sanitizer with gcc in my project.
So, I added the required flags in compiler as well as linker :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fno-omit-frame-pointer)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
Address Sanitizer is working after this, but it aborts my application after the first error. I want the Address Sanitizer to continue running even after reporting the error. So, I added one more flag like below (as per the link https://github.com/google/sanitizers/wiki/AddressSanitizer) :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer)
After this I am getting the error that this recover flag is not supported :
Problems were encountered while collecting compiler information:
cc1plus: error: -fsanitize-recover=address is not supported
PS : My gcc version is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
gcc cmake address-sanitizer
add a comment |
I am trying to use Address Sanitizer with gcc in my project.
So, I added the required flags in compiler as well as linker :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fno-omit-frame-pointer)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
Address Sanitizer is working after this, but it aborts my application after the first error. I want the Address Sanitizer to continue running even after reporting the error. So, I added one more flag like below (as per the link https://github.com/google/sanitizers/wiki/AddressSanitizer) :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer)
After this I am getting the error that this recover flag is not supported :
Problems were encountered while collecting compiler information:
cc1plus: error: -fsanitize-recover=address is not supported
PS : My gcc version is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
gcc cmake address-sanitizer
I am trying to use Address Sanitizer with gcc in my project.
So, I added the required flags in compiler as well as linker :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fno-omit-frame-pointer)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
Address Sanitizer is working after this, but it aborts my application after the first error. I want the Address Sanitizer to continue running even after reporting the error. So, I added one more flag like below (as per the link https://github.com/google/sanitizers/wiki/AddressSanitizer) :
ADD_COMPILE_OPTIONS(-O0 -g -Wall -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer)
After this I am getting the error that this recover flag is not supported :
Problems were encountered while collecting compiler information:
cc1plus: error: -fsanitize-recover=address is not supported
PS : My gcc version is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
gcc cmake address-sanitizer
gcc cmake address-sanitizer
edited Nov 20 '18 at 15:06
yugr
7,18921443
7,18921443
asked Nov 20 '18 at 10:45
mascotmascot
113
113
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I believe gcc 6 is the earliest version that supports Asan recovery mode. This mode was added in Nov 2015 whereas GCC 5 was released in April 2015.
You can install GCC 6 or use Clang.
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391286%2faddress-sanitizer-option-fsanitize-recover-address-is-not-supported%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I believe gcc 6 is the earliest version that supports Asan recovery mode. This mode was added in Nov 2015 whereas GCC 5 was released in April 2015.
You can install GCC 6 or use Clang.
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
add a comment |
I believe gcc 6 is the earliest version that supports Asan recovery mode. This mode was added in Nov 2015 whereas GCC 5 was released in April 2015.
You can install GCC 6 or use Clang.
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
add a comment |
I believe gcc 6 is the earliest version that supports Asan recovery mode. This mode was added in Nov 2015 whereas GCC 5 was released in April 2015.
You can install GCC 6 or use Clang.
I believe gcc 6 is the earliest version that supports Asan recovery mode. This mode was added in Nov 2015 whereas GCC 5 was released in April 2015.
You can install GCC 6 or use Clang.
edited Nov 20 '18 at 15:12
answered Nov 20 '18 at 15:05
yugryugr
7,18921443
7,18921443
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
add a comment |
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
Thanks for reply. I have installed Clang to use this feature. So, to use this recovery feature, you basically need GCC 6+ or Clang 2.8+ Infact newer Clang versions have a much better option to add a txt file with all the functions you don't need to sanitize (-fsanitize-blacklist)
– mascot
Nov 22 '18 at 9:12
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
@mascot I think you meant Clang 3.8.
– yugr
Nov 23 '18 at 4:30
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
Just to be completely precise, according to the commit info you referred to earlier, the support is available from GCC 6.1.0 on.
– szotsaki
Feb 15 at 12:11
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
@szotsaki Yes but there's no GCC 6.0 release so I just called it GCC 6.
– yugr
Feb 16 at 0:52
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391286%2faddress-sanitizer-option-fsanitize-recover-address-is-not-supported%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown