[Mesa-dev] [Bug 109543] After upgrade mesa to 19.0.0~rc1 all vulkan based application stop working ["vulkan-cube" received SIGSEGV in radv_pipeline_init_blend_state at ../src/amd/vulkan/radv_pipeline.c:699]

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 8 09:49:14 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=109543

--- Comment #11 from Igor Gnatenko <i.gnatenko.brain at gmail.com> ---
https://www.gnu.org/software/gcc/gcc-9/porting_to.html

Block scope compound literal's lifetime

The C standard says that compound literals which occur inside of the body of a
function have automatic storage duration associated with the enclosing block.
Older GCC releases were putting such compound literals into the scope of the
whole function, so their lifetime actually ended at the end of containing
function. This has been fixed in GCC 9. Code that relied on this extended
lifetime needs to be fixed, move the compound literals to whatever scope they
need to accessible in.


      struct S { int a, b; };
      int foo(void) {
        // The following line no longer compiles
        struct S *p = &({ (struct S) { 1, 2 }; });
        struct S *q;
        {
          q = &(struct S) { 3, 4 };
        }
        // This is invalid use after lifetime of the compound literal
        // ended.
        return q->b;
      }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190208/6818a095/attachment.html>


More information about the mesa-dev mailing list