[llvm-dev] UBSan runtime options

355 views
Skip to first unread message

Romanova, Katya via llvm-dev

unread,
Nov 19, 2015, 7:14:13 PM11/19/15
to llvm...@lists.llvm.org
Hello,
I have several low priority UBSan questions… 
 
(1) Is there a way for UBSan to print its output to a file that the user specified (e.g. via option) instead of dumping everything on stderr? 

 

(2) Out of curiosity, why is the name of the option for printing the stacktrace spelled

"UBSAN_OPTIONS=print_stacktrace=1", though the allowed value is 1?

Since the only one value is accepted, maybe it's more practical (and intuitive) to spell it

"UBSAN_OPTIONS=print_stacktrace"
 

(4) Do you know if there is better (i.e. more complete) documentation for UBSan somewhere?

This one is pretty good, but it doesn't talk about many things. E.g. it doesn't describe the runtime options that are possible to pass to UBSan (like the one that I talked about earlier).

http://clang.llvm.org/docs/UsersManual.html

This page below doesn't seems to mention UBSan at all (unlike the others most commonly used sanitizers). Is it done on purpose? Or it’s a work in progress?

http://clang.llvm.org/docs/

 

Thanks, Katya.

 

 

 

Kostya Serebryany via llvm-dev

unread,
Nov 19, 2015, 9:14:42 PM11/19/15
to Romanova, Katya, llvm...@lists.llvm.org, Alexey Samsonov
On Thu, Nov 19, 2015 at 4:14 PM, Romanova, Katya <Katya_R...@playstation.sony.com> wrote:
Hello,
I have several low priority UBSan questions… 
 
(1) Is there a way for UBSan to print its output to a file that the user specified (e.g. via option) instead of dumping everything on stderr? 

UBSAN_OPTIONS=log_path=YOUR_FILE 

 

(2) Out of curiosity, why is the name of the option for printing the stacktrace spelled

"UBSAN_OPTIONS=print_stacktrace=1", though the allowed value is 1?
the other allowed value is 0, and this is just a common syntax for all the flags.  

Since the only one value is accepted, maybe it's more practical (and intuitive) to spell it

"UBSAN_OPTIONS=print_stacktrace"
 

(4) Do you know if there is better (i.e. more complete) documentation for UBSan somewhere?


We hope to have clang.llvm.org/docs/UndefinedBehaviorSanitizer.html or some such in at most ~2 weeks (yes, this is long overdue, sorry). 

Romanova, Katya via llvm-dev

unread,
Nov 19, 2015, 9:16:50 PM11/19/15
to Kostya Serebryany, llvm...@lists.llvm.org, Alexey Samsonov

Excellent!

Thank you, Kostya.

 

Katya.

Reply all
Reply to author
Forward
0 new messages