https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71378

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to asankau from comment #5)
> (In reply to Martin Liška from comment #4)
> > (In reply to asankau from comment #3)
> > > Hi,
> > > Is there a workaround to this problem ? (I mean is there anything that I 
> > > can
> > > do to the source code of FGConfig.cpp to get rid of this error.)
> > 
> > You can workaround it by adding '--param asan-globals=0' to compile flags
> > used for the source file.
> 
> Thanks,
> 
> Without disabling error detection for global objects (i.e. setting
> asan-globals=0 ), is there a way to avoid this error by changing my source
> code ?
> 
> Sorry, I am not familiar with the internals of GCC. So I didn't understand
> the root cause given by you.
> 
> Wanted to know which section of my code triggered this error.

> > Is there a workaround to this problem ? (I mean is there anything that I can
> > do to the source code of FGConfig.cpp to get rid of this error.)
> 
> You can workaround it by adding '--param asan-globals=0' to compile flags
> used for the source file.

Problem is that we emit a string constant with a not constant size, I'm
preparing fix for that. It's caused by this snippet:

void FGConfig::FillLoadPartitionInfo()
{
 char zChannels[s_MDSPartIDStr.GetLen()+ 1] = "";
...

Reply via email to