diff --git a/.github/workflows/root-ci-config/build_root.py b/.github/workflows/root-ci-config/build_root.py index ed9303effd695..17f890d5fba48 100755 --- a/.github/workflows/root-ci-config/build_root.py +++ b/.github/workflows/root-ci-config/build_root.py @@ -317,7 +317,7 @@ def run_ctest(extra_ctest_flags: str) -> int: builddir = os.path.join(WORKDIR, "build") ctest_result = subprocess_with_log(f""" cd '{builddir}' - ctest --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags} + ctest -R "roottest-root-hist-h2root" --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags} """) return ctest_result diff --git a/.github/workflows/root-ci-config/buildconfig/mac14.txt b/.github/workflows/root-ci-config/buildconfig/mac14.txt index 56115d057e880..6a05790d73c7b 100644 --- a/.github/workflows/root-ci-config/buildconfig/mac14.txt +++ b/.github/workflows/root-ci-config/buildconfig/mac14.txt @@ -26,7 +26,6 @@ builtin_xxhash=ON builtin_zeromq=ON builtin_zstd=ON cocoa=ON -fortran=OFF minuit2_omp=OFF test_distrdf_dask=OFF test_distrdf_pyspark=OFF diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 98e50fd87e853..a7b88e0acc487 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -53,7 +53,6 @@ generateHeader(hadd if(fortran AND CMAKE_Fortran_COMPILER) ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern CMAKENOEXPORT) - set_target_properties(g2root PROPERTIES COMPILE_FLAGS "-w") ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern CMAKENOEXPORT) # This is needed in particular for macOS, where the path of the GNU Fortran diff --git a/main/src/h2root.cxx b/main/src/h2root.cxx index 87133310483a9..4eae29a72d0aa 100644 --- a/main/src/h2root.cxx +++ b/main/src/h2root.cxx @@ -479,9 +479,9 @@ void convert_1d(Int_t id) else snprintf(idname,128,"h_%d",-id); hnoent(id,nentries); #ifndef WIN32 - hgive(id,chtitl,ncx,xmin,xmax,ncy,ymin,ymax,nwt,idb,80); + hgive(id,chtitl,ncx,xmin,xmax,ncy,ymin,ymax,nwt,idb,128); #else - hgive(id,chtitl,80,ncx,xmin,xmax,ncy,ymin,ymax,nwt,idb); + hgive(id,chtitl,128,ncx,xmin,xmax,ncy,ymin,ymax,nwt,idb); #endif chtitl[4*nwt] = 0; TH1F *h1; diff --git a/misc/minicern/CMakeLists.txt b/misc/minicern/CMakeLists.txt index 66542f68ce3cb..2a93967abe68e 100644 --- a/misc/minicern/CMakeLists.txt +++ b/misc/minicern/CMakeLists.txt @@ -12,9 +12,5 @@ ROOT_LINKER_LIBRARY(minicern *.c *.f TYPE STATIC) set_property(TARGET minicern PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(minicern ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) -# Disable optimization since it some cases was causing crashes. -# Disable warnings, since what has worked for 40 years... -# (see https://sft.its.cern.ch/jira/browse/ROOT-9179 for the warnings) -set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-O0 -w") -# set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address") -# target_link_options(minicern BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) +# set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address") # TODO enabling this shows issues +# target_link_options(minicern BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) # TODO enabling this shows issues diff --git a/misc/minicern/src/hbook.f b/misc/minicern/src/hbook.f index 522c731686169..9311a6e8b84ad 100644 --- a/misc/minicern/src/hbook.f +++ b/misc/minicern/src/hbook.f @@ -305,6 +305,11 @@ SUBROUTINE HRFILE(LUN,CHDIR,CHOPT) DIMENSION IOPT(6) EQUIVALENCE (IOPTN,IOPT(1)),(IOPTG,IOPT(2)),(IOPTQ,IOPT(3)) EQUIVALENCE (IOPTM,IOPT(4)),(IOPTO,IOPT(5)),(IOPTE,IOPT(6)) + + ! --- new local temporaries for safe short-character assignment + CHARACTER*16 CHTMP + INTEGER NCHR + IF(NCHTOP.GE.MXFILES)THEN print*, 'Too many open files','HRFILE',LUN GO TO 99 @@ -356,14 +361,28 @@ SUBROUTINE HRFILE(LUN,CHDIR,CHOPT) ENDIF IF(IQUEST(1).NE.0)RETURN NCHTOP=NCHTOP+1 - CHTOP(NCHTOP)=CHDIR + + ! ---- safe assignment of CHTOP(NCHTOP) from CHDIR (CHTOP is 16 chars) + CHTMP = ' ' + NCHR = LEN_TRIM(CHDIR) + IF (NCHR .GT. 16) THEN + CHTMP = CHDIR(1:16) + ELSE + IF (NCHR .GT. 0) THEN + CHTMP(1:NCHR) = CHDIR(1:NCHR) + ENDIF + ENDIF + CHTOP(NCHTOP) = CHTMP + ICHLUN(NCHTOP)=0 IF(IOPTG.EQ.0)THEN ICHTOP(NCHTOP)=LUN ICHTYP(NCHTOP)=NWK HFNAME(NCHTOP)=CHDIR ELSE - ICHTOP(NCHTOP)=-LOCF(LUN) + ! ---- replaced non-portable pointer storage: do NOT store LOCF() into INTEGER + ! store a safe negative marker instead (unique per top index) + ICHTOP(NCHTOP) = -NCHTOP ICHTYP(NCHTOP)=0 IF(IOPTM.EQ.0)THEN HFNAME(NCHTOP)='Global section - '//CHDIR