2020-04-04 01:28 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005973Spring engineGeneralpublic2018-05-04 00:48
Reporterabma 
Assigned Toabma 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version104.0 +git 
Target Version105.0Fixed in Version 
Summary0005973: testFileSystem filesystem fails / old __GLIBCXX__ fails in std::regex
Descriptionhttps://travis-ci.org/spring/spring/jobs/374609187
Steps To Reproduce
g++ -std=c++11 test.cpp && ./a.out

test.cpp:

#include <regex>
#include <string>
#include <stdio.h>


int main()
{

        printf("%d\n", __GLIBCXX__);

        std::string res = "/home/userX/.spring/foo/bar///./../test.log";

        res = std::regex_replace(res, std::regex("[/]{2,}"), {"/"});
        res = std::regex_replace(res, std::regex("[^/]+[/][.]{2}"), {""});
        res = std::regex_replace(res, std::regex("[/]{2,}"), {"/"});

        printf("%s\n", res.c_str());
        return 0;
}
Additional InformationLC_ALL=C ./a.out
20150623
terminate called after throwing an instance of 'std::regex_error'
  what(): regex_error
Abgebrochen (Speicherabzug geschrieben)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0019070

abma (administrator)

https://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions

~0019071

abma (administrator)

now travis-ci needs to be fixed :-|

~0019072

Kloot (developer)

Last edited: 2018-05-03 23:54

View 2 revisions

you already did (18fc5eedfe68ff018c6fde73b88e843ea5f9ba8f), just missed the clang part.

~0019073

abma (administrator)

clang seems to "randomly" pick the existing libstdc++ headers / lib which makes it fail.

hopefully fixes it:
https://github.com/spring/spring/commit/e38313a4ecf4a4c6cb12186ba1ecc0e42a91d9b9

not sure if there is a better solution. if it fails libstdc++-5-dev/libstdc++-6-dev could be tried, too. :-|

~0019074

abma (administrator)

oh, correction:

just a missing linker flag it seems

~0019075

abma (administrator)

at least the linking error is gone:

https://travis-ci.org/spring/spring/jobs/374645896#L1933

the rest should work :)
+Notes

-Issue History
Date Modified Username Field Change
2018-05-03 23:29 abma New Issue
2018-05-03 23:42 abma Note Added: 0019070
2018-05-03 23:42 abma Note Added: 0019071
2018-05-03 23:54 Kloot Note Added: 0019072
2018-05-03 23:54 Kloot Note Edited: 0019072 View Revisions
2018-05-04 00:21 abma Note Added: 0019073
2018-05-04 00:43 abma Note Added: 0019074
2018-05-04 00:48 abma Assigned To => abma
2018-05-04 00:48 abma Status new => resolved
2018-05-04 00:48 abma Resolution open => fixed
2018-05-04 00:48 abma Note Added: 0019075
+Issue History