[PATCH] D24781: [ubsan] Respect log_to_syslog=1 on Darwin

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 22:06:19 PDT 2016


vsk added a comment.

> Are you sure that UBSan workflow should be different from TSan workflow? In my mind they are the same.


Yes, they should be different. Ubsan's ability to log before exit time isn't constrained, so there's no reason to take the same approach. Logging early is more convenient, has fewer restrictions, and is less surprising.

However, **not** logging to the syslog at the same time we log to the console **is** surprising.

> > For one, we're not limited by the fixed-size 

> 

> >  crashlog buffer. Secondly, we can extract errors from long-running apps or daemons without having to 

> 

> >  shut them down. In some situations (e.g Xcode UI Tests), instrumented apps are killed with SIGTERM 

> 

> >  and their atexit() handlers never run..

> 

> 

> What would be the user workflow for the Xcode UI Tests? (Syslog is not a great communication channel in that case.)


Sorry, that was a bad example. In that scenario we'd use the same mechanism TSan has for reporting issues to Xcode through lldb.

There are other scenarios where we'd have to go through launchctl, or some other daemon management tool just to get UB reports to show up in the syslog. I'd rather avoid that.


https://reviews.llvm.org/D24781





More information about the llvm-commits mailing list