Bug 1633233

Summary: csstidy instant coredump
Product: [Fedora] Fedora Reporter: Ali Akcaagac <aliakc>
Component: csstidyAssignee: Pavel Alexeev <pahan>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: pahan, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 20:41:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Simple CSS file to cause core dump none

Description Ali Akcaagac 2018-09-26 13:23:08 UTC
Just installed csstidy from the repo (Fedora 29). As soon as I call it up it instantly coredumps.

csstidy index.css

/usr/include/c++/8/bits/basic_string.h:1048: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.

Aborted (core dumped)

Comment 1 Stefan Schwarzer 2019-01-15 12:10:25 UTC
I see the same problem with even a primitive CSS file:

$ dnf list csstidy
Last metadata expiration check: 4:13:35 ago on 2019-01-15T08:55:27 CET.
Installed Packages
csstidy.x86_64                        1.4-20.fc29                        @fedora

$ csstidy

Usage:

csstidy input_filename [
 --allow_html_in_templates=[false|true] |
 --compress_colors=[true|false] |
 --compress_font-weight=[true|false] |
 --discard_invalid_properties=[false|true] |
 --lowercase_s=[false|true] |
 --preserve_css=[false|true] |
 --remove_bslash=[true|false] |
 --remove_last_;=[false|true] |
 --silent=[false|true] |
 --sort_properties=[false|true] |
 --sort_selectors=[false|true] |
 --timestamp=[false|true] |
 --merge_selectors=[2|1|0] |
 --case_properties=[0|1|2] |
 --optimise_shorthands=[1|2|0] |
 --template=[default|filename|low|high|highest] |
 output_filename ]*

$ cat dummy.css 
body {
}

$ csstidy dummy.css 
/usr/include/c++/8/bits/basic_string.h:1048: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Aborted (core dumped)

Comment 2 Stefan Schwarzer 2019-01-15 12:11:32 UTC
Created attachment 1520750 [details]
Simple CSS file to cause core dump

Comment 3 Stefan Schwarzer 2019-01-15 12:25:39 UTC
There's a similar report for grub-customizer (ticket 1570260). I don't know if the fix from there would be applicable for csstidy.

Comment 4 Ben Cotton 2019-10-31 20:10:16 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-11-27 20:41:56 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.