Skip to content
  • Tom Stellard's avatar
    7daf5242
    Merging r323390: · 7daf5242
    Tom Stellard authored
    ------------------------------------------------------------------------
    r323390 | ericwf | 2018-01-24 16:02:48 -0800 (Wed, 24 Jan 2018) | 9 lines
    
    Fix PR35564 - std::list splice/erase incorrectly throw in debug mode.
    
    There was a bug in the implementation of splice where the container
    sizes were updated before decrementing one of the iterators. Afterwards,
    the result of decrementing the iterator was flagged as UB by the debug
    implementation because the container was reported to be empty.
    
    This patch fixes that bug by delaying the updating of the container
    sizes until after the iterators have been correctly constructed.
    ------------------------------------------------------------------------
    
    llvm-svn: 334621
    7daf5242
    Merging r323390:
    Tom Stellard authored
    ------------------------------------------------------------------------
    r323390 | ericwf | 2018-01-24 16:02:48 -0800 (Wed, 24 Jan 2018) | 9 lines
    
    Fix PR35564 - std::list splice/erase incorrectly throw in debug mode.
    
    There was a bug in the implementation of splice where the container
    sizes were updated before decrementing one of the iterators. Afterwards,
    the result of decrementing the iterator was flagged as UB by the debug
    implementation because the container was reported to be empty.
    
    This patch fixes that bug by delaying the updating of the container
    sizes until after the iterators have been correctly constructed.
    ------------------------------------------------------------------------
    
    llvm-svn: 334621
Loading