Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] remove class prefix if any in IsDefAlloc #17048

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Contributor

This Pull request:

Changes or fixes:

Fixes #6607

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@dpiparo
Copy link
Member

dpiparo commented Nov 26, 2024

Thanks for this PR. Would it make sense to also transform in a test (or add to the one written for this PR) the example reported in the original issue ?

std::string n;
TClassEdit::GetNormalizedName(n, "std::vector<float, class std::allocator<float>>");
n == std::string("vector<float>"); 

@ferdymercury
Copy link
Contributor Author

ferdymercury commented Nov 26, 2024

@bellenot Do you understand by chance why the build fails on Windows after this change?

2024-11-26T12:01:15.3137073Z   Stack dump:
2024-11-26T12:01:15.3209869Z   0.	Program arguments: C:/ROOT-CI/build/bin/rootcling.exe -rootbuild -v2 -f G__Geom.cxx -s C:/ROOT-CI/build/bin/libGeom.dll -m libThread_rdict.pcm -m libRIO_rdict.pcm -m libMathCore_rdict.pcm -m libHist_rdict.pcm -excludePath C:/ROOT-CI/src -excludePath C:/ROOT-CI/build/ginclude -excludePath C:/ROOT-CI/build/externals -excludePath C:/ROOT-CI/build/builtins -rml libGeom.dll -rmf C:/ROOT-CI/build/bin/libGeom.rootmap -IC:/ROOT-CI/build/include -IC:/ROOT-CI/build/LZMA/src/LZMA/include -IC:/ROOT-CI/src/geom/geom/inc -IC:/ROOT-CI/src/core/winnt/inc -IC:/ROOT-CI/src/builtins/zstd -IC:/ROOT-CI/src/core/zstd/inc -IC:/ROOT-CI/src/core/lz4/inc -IC:/ROOT-CI/build/LZMA/src/LZMA/include -IC:/ROOT-CI/src/core/lzma/inc -IC:/ROOT-CI/src/core/zip/inc -IC:/ROOT-CI/src/core/thread/inc -IC:/ROOT-CI/src/core/textinput/src -IC:/ROOT-CI/src/core/textinput/inc -IC:/ROOT-CI/src/core/rint/inc -IC:/ROOT-CI/src/core/meta/inc -IC:/ROOT-CI/src/core/gui/inc -IC:/ROOT-CI/src/core/foundation/res -IC:/ROOT-CI/src/core/foundation/v7/inc -IC:/ROOT-CI/src/core/foundation/inc -IC:/ROOT-CI/src/core/cont/inc -IC:/ROOT-CI/src/core/clingutils/res -IC:/ROOT-CI/src/core/clingutils/inc -IC:/ROOT-CI/src/core/clib/inc -IC:/ROOT-CI/src/core/base/v7/inc -IC:/ROOT-CI/src/core/base/inc -IC:/ROOT-CI/build/ginclude -IC:/ROOT-CI/src/io/io/v7/inc -IC:/ROOT-CI/src/io/io/inc -IC:/ROOT-CI/src/core/clib/res -IC:/ROOT-CI/src/builtins -IC:/ROOT-CI/src/math/mathcore/v7/inc -IC:/ROOT-CI/src/math/mathcore/inc -IC:/ROOT-CI/src/core/imt/inc -IC:/ROOT-CI/src/hist/hist/inc -IC:/ROOT-CI/src/math/matrix/inc TGDMLMatrix.h TGeoArb8.h TGeoAtt.h TGeoBBox.h TGeoBoolNode.h TGeoBranchArray.h TGeoBuilder.h TGeoCache.h TGeoCompositeShape.h TGeoCone.h TGeoElement.h TGeoEltu.h TGeoExtension.h TGeoGlobalMagField.h TGeoHalfSpace.h TGeoHelix.h TGeoHype.h TGeoManager.h TGeoMaterial.h TGeoMatrix.h TGeoMedium.h TGeoNavigator.h TGeoNode.h TGeoOpticalSurface.h TGeoPara.h TGeoParaboloid.h TGeoParallelWorld.h TGeoPatternFinder.h TGeoPcon.h TGeoPgon.h TGeoPhysicalConstants.h TGeoPhysicalNode.h TGeoPolygon.h TGeoRCPtr.h TGeoRegion.h TGeoScaledShape.h TGeoShape.h TGeoShapeAssembly.h TGeoSphere.h TGeoStateInfo.h TGeoSystemOfUnits.h TGeoTorus.h TGeoTrd1.h TGeoTrd2.h TGeoTube.h TGeoUniformMagField.h TGeoVolume.h TGeoVoxelFinder.h TGeoXtru.h TGeoTessellated.h TGeoVector3.h TVirtualGeoConverter.h TVirtualGeoPainter.h TVirtualGeoTrack.h TVirtualMagField.h C:/ROOT-CI/src/geom/geom/inc/LinkDef.h
2024-11-26T12:01:15.3223877Z   Exception Code: 0xE06D7363
2024-11-26T12:01:15.5947639Z    #0 0x76600f22 (C:\Windows\System32\KERNELBASE.dll+0x140f22)
2024-11-26T12:01:15.5948365Z    #1 0x70337e96 (C:\Windows\SYSTEM32\VCRUNTIME140.dll+0x7e96)
2024-11-26T12:01:15.5949037Z    #2 0x6ff1d11f (C:\Windows\SYSTEM32\MSVCP140.dll+0x2d11f)
2024-11-26T12:01:15.5953319Z    #3 0x6bf2ef2a std::_String_val<struct std::_Simple_types<char>>::_Xran(void) (C:\ROOT-CI\build\bin\libCore.dll+0x9ef2a)
2024-11-26T12:01:15.5954641Z    #4 0x6bf4035a TClassEdit::ResolveTypedef(char const *, bool) (C:\ROOT-CI\build\bin\libCore.dll+0xb035a)
2024-11-26T12:01:15.5955813Z    #5 0x6bf3fce9 TClassEdit::ResolveTypedef(char const *, bool) (C:\ROOT-CI\build\bin\libCore.dll+0xafce9)
2024-11-26T12:01:15.5957370Z    #6 0x6bf41c19 TClassEdit::TSplitType::ShortType(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> &, int) (C:\ROOT-CI\build\bin\libCore.dll+0xb1c19)
2024-11-26T12:01:15.5959889Z    #7 0x6bf3c253 TClassEdit::GetNormalizedName(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> &, class std::basic_string_view<char, struct std::char_traits<char>>) (C:\ROOT-CI\build\bin\libCore.dll+0xac253)
2024-11-26T12:01:15.5962058Z    #8 0x6bf3e811 TClassEdit::IsDefAlloc(char const *, char const *) (C:\ROOT-CI\build\bin\libCore.dll+0xae811)
2024-11-26T12:01:15.5964374Z    #9 0x6bf3deda TClassEdit::IsDefAlloc(char const *, char const *, char const *) (C:\ROOT-CI\build\bin\libCore.dll+0xadeda)
2024-11-26T12:01:15.5967204Z   #10 0x6bf4192a TClassEdit::TSplitType::ShortType(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> &, int) (C:\ROOT-CI\build\bin\libCore.dll+0xb192a)
2024-11-26T12:01:15.5971909Z   #11 0x6c4e0a5b ExtractClassesListAndDeclLines(class RScanner &, class std::list<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>, class std::allocator<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>> &, class std::list<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>, class std::allocator<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>> &, class std::list<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>, class std::allocator<class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>> &, class cling::Interpreter const &) (C:\ROOT-CI\build\bin\libCling.dll+0xa0a5b)
2024-11-26T12:01:15.5975949Z   #12 0x6c4f0b2d RootClingMain(int, char **, bool) (C:\ROOT-CI\build\bin\libCling.dll+0xb0b2d)
2024-11-26T12:01:15.5976976Z   #13 0x6c4fed6d ROOT_rootcling_Driver (C:\ROOT-CI\build\bin\libCling.dll+0xbed6d)
2024-11-26T12:01:15.5978211Z   #14 0x00991084 main (C:\ROOT-CI\build\bin\rootcling.exe+0x1084)
2024-11-26T12:01:15.5978908Z   #15 0x00991274 main (C:\ROOT-CI\build\bin\rootcling.exe+0x1274)
2024-11-26T12:01:15.5979654Z   #16 0x7722fcc9 (C:\Windows\System32\KERNEL32.DLL+0x1fcc9)
2024-11-26T12:01:15.5980290Z   #17 0x77de809e (C:\Windows\SYSTEM32\ntdll.dll+0x6809e)
2024-11-26T12:01:15.5980883Z   #18 0x77de806e (C:\Windows\SYSTEM32\ntdll.dll+0x6806e)
2024-11-26T12:01:15.6438910Z C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\ROOT-CI\build\CMakeFiles\1aa06453c354d599410084f38094f3b8\G__Geom.cxx.rule;C:\ROOT-CI\src\geom\geom\CMakeLists.txt' exited with code -529697949. [C:\ROOT-CI\build\geom\geom\G__Geom.vcxproj]

@bellenot
Copy link
Member

@ferdymercury I'll check after the hackathon (in a couple of days...)

GH issue

as suggested by dpiparo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TClassEdit::GetNormalizedName does not strip std::allocator on Windows
3 participants