Bug 1573092 - SIGARBT when using astyle with --recursive
Summary: SIGARBT when using astyle with --recursive
Alias: None
Product: Fedora
Classification: Fedora
Component: astyle
Version: 28
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
: 1573093 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-30 07:54 UTC by Andrew Hutchings
Modified: 2018-05-23 23:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-23 23:56:52 UTC
Type: Bug

Attachments (Terms of Use)
Proposal patch (559 bytes, patch)
2018-05-02 14:56 UTC, Mamoru TASAKA
no flags Details | Diff

Description Andrew Hutchings 2018-04-30 07:54:16 UTC
Description of problem:
astyle with SIGABRT in Fedora 28 when --recursive is used. Works fine in Fedora 27.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Go to a directory with some .c and .h files
2. Execute: astyle --recursive "*.c" "*.h"

Actual results:
Directory  /home/linuxjedi/Programming/Git/libattachsql/*.c
/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::vector<_Tp, _Alloc>::reference = std::__cxx11::basic_string<char>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Aborted (core dumped)

Expected results:
No crash

Additional info:
As a workaround I downgraded to astyle-3.0.1-4.fc27.x86_64 which works fine.

Comment 1 Mamoru TASAKA 2018-04-30 09:12:16 UTC
*** Bug 1573093 has been marked as a duplicate of this bug. ***

Comment 2 Mamoru TASAKA 2018-05-02 09:04:28 UTC
Would you check if the following works?

Comment 3 Andrew Hutchings 2018-05-02 10:18:51 UTC
That works perfectly! Many thanks!

Comment 4 Mamoru TASAKA 2018-05-02 14:56:08 UTC
Created attachment 1430099 [details]
Proposal patch

Reported upstream: https://sourceforge.net/p/astyle/bugs/503/.

Proposal patch also attached here.

Comment 5 Mamoru TASAKA 2018-05-14 04:44:20 UTC
For now, I will take care of this.

Comment 6 Fedora Update System 2018-05-14 05:16:12 UTC
astyle-3.1-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e41ea65d96

Comment 7 Fedora Update System 2018-05-14 20:39:08 UTC
astyle-3.1-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e41ea65d96

Comment 8 Fedora Update System 2018-05-23 15:39:01 UTC
astyle-3.1-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Mamoru TASAKA 2018-05-23 23:56:52 UTC

Note You need to log in before you can comment on or make changes to this bug.