MaskRay wrote:

> Reverted at 
> [e7f7948](https://github.com/llvm/llvm-project/commit/e7f794875169811f3801fad6d40bb9fe833e1a69).
>  Will file an issue to track it once reducing is done.

I've reduced it. It's code like below where a  memcpy confused 
StackSafetyAnalysis in a  macOS+libc++ build.

```cpp
int floatsuffix_check(TParseContext *context)
{
    struct yyguts_t *yyg = (struct yyguts_t *)context->getScanner();

    if (context->getShaderVersion() < 300)
    {
        context->error(*yyg->yylloc_r, "Floating-point suffix unsupported prior 
to GLSL ES 3.00", yyg->yytext_r);
        return 0;
    }

    std::string text = yyg->yytext_r;
    text.resize(text.size() - 1);    ///////// 
    if (!strtof_clamp(text, &(yyg->yylval_r->lex.f)))
        yyg->yyextra_r->warning(*yyg->yylloc_r, "Float overflow", 
yyg->yytext_r);

    return (FLOATCONSTANT);
}
```

https://github.com/llvm/llvm-project/pull/77210
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to