View Issue Details

IDProjectCategoryView StatusLast Update
0005973Spring engineGeneralpublic2018-05-04 00:48
Reporterabma Assigned Toabma  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version104.0 +git 
Target Version105.0 
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

Activities

abma

2018-05-03 23:42

administrator   ~0019070

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

abma

2018-05-03 23:42

administrator   ~0019071

now travis-ci needs to be fixed :-|

Kloot

2018-05-03 23:54

developer   ~0019072

Last edited: 2018-05-03 23:54

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

abma

2018-05-04 00:21

administrator   ~0019073

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. :-|

abma

2018-05-04 00:43

administrator   ~0019074

oh, correction:

just a missing linker flag it seems

abma

2018-05-04 00:48

administrator   ~0019075

at least the linking error is gone:

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

the rest should work :)

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
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