r273564 - in /trunk/gcc/go/gofrontend: MERGE ex...

ian@gcc.gnu.org ian@gcc.gnu.org
Thu Jul 18 05:05:00 GMT 2019


Author: ian
Date: Thu Jul 18 05:05:20 2019
New Revision: 273564

URL: https://gcc.gnu.org/viewcvs?rev=273564&root=gcc&view=rev
Log:
    compiler: fix bug in handling of unordered set during exporting
    
    In CL 183850 a change was made to combine tracking/discovery of
    exported types and imported packages during export data generation. As
    a result of this refactoring a bug was introduced: the new code can
    potentially insert items into the exports set (an unordered_set) while
    iterating through the same set, which is illegal according to the spec
    for std::unordered_set.
    
    This patch fixes the problem by changing the type discovery phase to
    iterate through a separate list of sorted exports, as opposed to
    iterating through the main unordered set.  Also included is a change
    to fix the code that looks for variables that are referenced from
    inlined routine bodies (this code wasn't scanning all of the function
    that it needed to scan).
    
    New test case for this problem in CL 186697.
    
    Updates golang/go#33020.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185977

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/gcc/go/gofrontend/export.cc
    trunk/gcc/go/gofrontend/export.h
    trunk/gcc/go/gofrontend/gogo.cc



More information about the Gcc-cvs mailing list