Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559666 - net-nntp/pan: crash when built with gcc-5.2
Summary: net-nntp/pan: crash when built with gcc-5.2
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Keywords: PATCH
Depends on:
Blocks: gcc-5
  Show dependency tree
Reported: 2015-09-05 13:49 UTC by Holger Hoffstätte
Modified: 2015-09-07 19:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Suggested fix to enforce the old std::string ABI (pan-0.139-gcc52.patch,354 bytes, patch)
2015-09-05 13:52 UTC, Holger Hoffstätte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2015-09-05 13:49:53 UTC
Pan shows odd behaviour/crashes when rebuilt with gcc-5.2 (see $URL for discussion/triage), due to the change in libstdc++ std::string handling. Rebuilding pan with the old ABI behaviour fixes the problem reliably and in a nonintrusive, backwards-compatible way.

Reproducible: Always

Steps to Reproduce:
1. build pan with gcc-5.2.0
2. start it
3. witness random crashing or lack of configuration
Actual Results:  
Random crashes on startup, odd behaviour due to environment variables and/or other temp. information being overwritten (timing-dependent).

Expected Results:  
No crashes, pan should be able to find its ~/.pan2 config directory.

This bug is clearly a problem in pan itself as the code seemed to work withthe old std::string behaviour, where CoW saved pointer contents from being eaten prematurely. Until this is fixed upstream simply reverting to the old ABI behaviour seems to be the simplest fix.
Comment 1 Holger Hoffstätte 2015-09-05 13:52:21 UTC
Created attachment 411056 [details, diff]
Suggested fix to enforce the old std::string ABI
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-07 15:59:10 UTC
(In reply to Holger Hoffstätte from comment #1)

No. We are not going to put bandaids on upstream's lack of experience with c++ by forcing a particular implementation of libstdc++ that happens to make pan not crash by lucky accident. This needs to be fixed properly.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-07 17:34:50 UTC
Fixed in pan-0.139-r1

Patch submitted upstream at

Please test!

commit 3e828ee766a6ebaa5c71ed1764f7998d59c24054
Author: Alexandre Rostovtsev <>
Date:   Mon Sep 7 13:29:52 2015 -0400

    net-nntp/pan: fix newsrc-* files created in wrong place with g++-5
    Gentoo-Bug: 559666
    Reported-by: Holger Hoffstätte
    Package-Manager: portage-
Comment 4 Holger Hoffstätte 2015-09-07 19:18:55 UTC
Thanks for this proper fix; I hadn't looked at the code yet. After seeing your patch I agree that returning a reference to a static string is the right thing to do here. Upgraded to -r1 and it seems to be working fine so far.