[cfe-dev] libclang crash when parsing MS-style inline assembly

Jean-Daniel Dupas devlists at shadowlab.org
Sat Nov 9 05:10:26 PST 2013


Le 9 nov. 2013 à 11:43, Kim Gräsman <kim.grasman at gmail.com> a écrit :

> On Sat, Nov 9, 2013 at 10:49 AM, Alp Toker <alp at nuanti.com> wrote:
>> 
>> On 09/11/2013 09:23, Kim Gräsman wrote:
>>> 
>>> So we'll just keep the InitializeNativeTarget* calls in main(), and
>>> life is good!
>> 
>> Good on x86, not so good when cross-compiling (cross-IWYUing?) from a
>> non-Intel architecture. The snippet I gave handles that as long as an
>> x86 target has been built in FWIW.
> 
> I was just about to ask -- thanks for confirming!
> 
> And what controls whether an x86 target is built in? What happens in
> its absence? It's not really a critical error for syntax-only tools,
> so it would be nice if LLVMInitializeX86* could warn instead of
> failing. Or maybe there needs to be a way for tools to ask whether the
> target is available before attempting to initialize, so they can shape
> the warning themselves.
> 

Maybe the ASM syntax parser should be changed to gracefully failed when the target is not available ?

-- Jean-Daniel








More information about the cfe-dev mailing list