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

[libc] enable most of the entrypoints on aarch64 #101797

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

SchrodingerZhu
Copy link
Contributor

This is a non-feature change that enables most of the entrypoints for aarch64 based runtime builds. It fixes an additional problem that some compiler-rt targets are not defined at the time of dependency checking thus leading to false-negatives.

@llvmbot
Copy link
Member

llvmbot commented Aug 3, 2024

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

This is a non-feature change that enables most of the entrypoints for aarch64 based runtime builds. It fixes an additional problem that some compiler-rt targets are not defined at the time of dependency checking thus leading to false-negatives.


Full diff: https://github.com/llvm/llvm-project/pull/101797.diff

3 Files Affected:

  • (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (+5-1)
  • (modified) libc/config/linux/aarch64/entrypoints.txt (+99-21)
  • (modified) libc/src/stdlib/CMakeLists.txt (+8-6)
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index a8b0c61d2236a..539ed0429549f 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -22,7 +22,11 @@ function(get_object_files_for_test result skipped_entrypoints_list)
   foreach(dep IN LISTS unchecked_list)
     if (NOT TARGET ${dep})
       # Skip tests with undefined dependencies.
-      list(APPEND skipped_list ${dep})
+      # Compiler-RT targets are added only if they are enabled. However, such targets may not be defined
+      # at the time of the libc build. We should skip checking such targets.
+      if (NOT ${dep} MATCHES "^RTScudo.*|^RTGwp.*")
+        list(APPEND skipped_list ${dep})
+      endif()
       continue()
     endif()
     get_target_property(aliased_target ${dep} "ALIASED_TARGET")
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index ebdaa0f6de7fd..4db1367c7cc30 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -68,6 +68,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.string.strchr
     libc.src.string.strchrnul
     libc.src.string.strcmp
+    libc.src.string.strcoll
     libc.src.string.strcpy
     libc.src.string.strcspn
     libc.src.string.strdup
@@ -90,6 +91,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.string.strstr
     libc.src.string.strtok
     libc.src.string.strtok_r
+    libc.src.string.strxfrm
 
     # inttypes.h entrypoints
     libc.src.inttypes.imaxabs
@@ -185,6 +187,9 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.stdlib.qsort_r
     libc.src.stdlib.rand
     libc.src.stdlib.srand
+    libc.src.stdlib.strfromd
+    libc.src.stdlib.strfromf
+    libc.src.stdlib.strfroml
     libc.src.stdlib.strtod
     libc.src.stdlib.strtof
     libc.src.stdlib.strtol
@@ -202,18 +207,34 @@ set(TARGET_LIBC_ENTRYPOINTS
 
     # stdio.h entrypoints
     libc.src.stdio.fdopen
-    #libc.src.stdio.fscanf
+    libc.src.stdio.fileno
+    libc.src.stdio.fprintf
+    libc.src.stdio.fscanf
+    libc.src.stdio.printf
     libc.src.stdio.remove
     libc.src.stdio.rename
+    libc.src.stdio.scanf
     libc.src.stdio.snprintf
     libc.src.stdio.sprintf
     libc.src.stdio.asprintf
-    #libc.src.stdio.scanf
-    #libc.src.stdio.sscanf
+    libc.src.stdio.sscanf
+    libc.src.stdio.vsscanf
+    libc.src.stdio.vfprintf
+    libc.src.stdio.vprintf
     libc.src.stdio.vsnprintf
     libc.src.stdio.vsprintf
     libc.src.stdio.vasprintf
 
+    # sys/epoll.h entrypoints
+    libc.src.sys.epoll.epoll_create
+    libc.src.sys.epoll.epoll_create1
+    libc.src.sys.epoll.epoll_ctl
+    libc.src.sys.epoll.epoll_pwait
+    libc.src.sys.epoll.epoll_wait
+    # TODO: Need to check if pwait2 is available before providing.
+    # https://github.com/llvm/llvm-project/issues/80060
+    # libc.src.sys.epoll.epoll_pwait2
+
     # sys/mman.h entrypoints
     libc.src.sys.mman.madvise
     libc.src.sys.mman.mincore
@@ -250,6 +271,10 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.sys.stat.mkdirat
     libc.src.sys.stat.stat
 
+    # sys/statvfs.h
+    libc.src.sys.statvfs.fstatvfs
+    libc.src.sys.statvfs.statvfs
+
     # sys/utsname.h entrypoints
     libc.src.sys.utsname.uname
 
@@ -264,12 +289,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     # sys/auxv.h entrypoints
     libc.src.sys.auxv.getauxval
 
-    # sys/epoll.h entrypoints
-    # Disabled due to epoll_wait syscalls not being available on this platform.
-    # libc.src.sys.epoll.epoll_wait
-    # libc.src.sys.epoll.epoll_pwait
-    # libc.src.sys.epoll.epoll_pwait2
-
     # termios.h entrypoints
     libc.src.termios.cfgetispeed
     libc.src.termios.cfgetospeed
@@ -306,6 +325,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.unistd.linkat
     libc.src.unistd.lseek
     libc.src.unistd.pathconf
+    libc.src.unistd.pipe
     libc.src.unistd.pread
     libc.src.unistd.pwrite
     libc.src.unistd.read
@@ -319,6 +339,9 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.unistd.unlink
     libc.src.unistd.unlinkat
     libc.src.unistd.write
+
+    # wchar.h entrypoints
+    libc.src.wchar.wctob
 )
 
 set(TARGET_LIBM_ENTRYPOINTS
@@ -552,17 +575,25 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.canonicalizef16
     libc.src.math.ceilf16
     libc.src.math.copysignf16
+    libc.src.math.expf16
     libc.src.math.f16add
     libc.src.math.f16addf
+    libc.src.math.f16addl
     libc.src.math.f16div
     libc.src.math.f16divf
+    libc.src.math.f16divl
+    libc.src.math.f16fma
     libc.src.math.f16fmaf
+    libc.src.math.f16fmal
     libc.src.math.f16mul
     libc.src.math.f16mulf
+    libc.src.math.f16mull
     libc.src.math.f16sqrt
     libc.src.math.f16sqrtf
+    libc.src.math.f16sqrtl
     libc.src.math.f16sub
     libc.src.math.f16subf
+    libc.src.math.f16subl
     libc.src.math.fabsf16
     libc.src.math.fdimf16
     libc.src.math.floorf16
@@ -576,6 +607,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.fminimum_magf16
     libc.src.math.fminimum_numf16
     libc.src.math.fminimumf16
+    libc.src.math.fmodf16
     libc.src.math.frexpf16
     libc.src.math.fromfpf16
     libc.src.math.fromfpxf16
@@ -588,15 +620,12 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.logbf16
     libc.src.math.lrintf16
     libc.src.math.lroundf16
-    # libc.src.math.modff16
+    libc.src.math.modff16
     libc.src.math.nanf16
     libc.src.math.nearbyintf16
     libc.src.math.nextafterf16
     libc.src.math.nextdownf16
-    # Temporarily disable nexttowardf16 on aarch64 because the conversion
-    # between _Float16 and long double will crash clang-11.  This is fixed in
-    # clang-12 and after: https://godbolt.org/z/8ceT9454c
-    # libc.src.math.nexttowardf16
+    libc.src.math.nexttowardf16
     libc.src.math.nextupf16
     libc.src.math.remainderf16
     libc.src.math.remquof16
@@ -613,16 +642,30 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.ufromfpf16
     libc.src.math.ufromfpxf16
   )
+
+  if(LIBC_TYPES_HAS_FLOAT128)
+    list(APPEND TARGET_LIBM_ENTRYPOINTS
+      # math.h C23 mixed _Float16 and _Float128 entrypoints
+      libc.src.math.f16addf128
+      libc.src.math.f16divf128
+      libc.src.math.f16fmaf128
+      libc.src.math.f16mulf128
+      libc.src.math.f16sqrtf128
+      libc.src.math.f16subf128
+    )
+  endif()
 endif()
 
 if(LIBC_TYPES_HAS_FLOAT128)
   list(APPEND TARGET_LIBM_ENTRYPOINTS
     # math.h C23 _Float128 entrypoints
+    libc.src.math.canonicalizef128
     libc.src.math.ceilf128
     libc.src.math.copysignf128
     libc.src.math.daddf128
     libc.src.math.ddivf128
     libc.src.math.dfmaf128
+    libc.src.math.dmulf128
     libc.src.math.dsqrtf128
     libc.src.math.dsubf128
     libc.src.math.fabsf128
@@ -639,9 +682,11 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.fminimum_numf128
     libc.src.math.fminimumf128
     libc.src.math.fmodf128
+    libc.src.math.fmulf128
     libc.src.math.frexpf128
     libc.src.math.fromfpf128
     libc.src.math.fromfpxf128
+    libc.src.math.fsqrtf128
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.ldexpf128
@@ -659,8 +704,8 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.nextupf128
     libc.src.math.remquof128
     libc.src.math.rintf128
-    libc.src.math.roundf128
     libc.src.math.roundevenf128
+    libc.src.math.roundf128
     libc.src.math.scalbnf128
     libc.src.math.setpayloadf128
     libc.src.math.sqrtf128
@@ -674,9 +719,18 @@ endif()
 
 if(LLVM_LIBC_FULL_BUILD)
   list(APPEND TARGET_LIBC_ENTRYPOINTS
+    # assert.h entrypoints
+    libc.src.assert.__assert_fail
+
     # compiler entrypoints (no corresponding header)
     libc.src.compiler.__stack_chk_fail
 
+    # dirent.h entrypoints
+    libc.src.dirent.closedir
+    libc.src.dirent.dirfd
+    libc.src.dirent.opendir
+    libc.src.dirent.readdir
+
     # network.h entrypoints
     libc.src.network.htonl
     libc.src.network.htons
@@ -695,6 +749,12 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.pthread.pthread_attr_setguardsize
     libc.src.pthread.pthread_attr_setstack
     libc.src.pthread.pthread_attr_setstacksize
+    libc.src.pthread.pthread_condattr_destroy
+    libc.src.pthread.pthread_condattr_getclock
+    libc.src.pthread.pthread_condattr_getpshared
+    libc.src.pthread.pthread_condattr_init
+    libc.src.pthread.pthread_condattr_setclock
+    libc.src.pthread.pthread_condattr_setpshared
     libc.src.pthread.pthread_create
     libc.src.pthread.pthread_detach
     libc.src.pthread.pthread_equal
@@ -755,7 +815,8 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.stdio.ferror_unlocked
     libc.src.stdio.fflush
     libc.src.stdio.fgetc
-    libc.src.stdio.fileno
+    libc.src.stdio.fgetc_unlocked
+    libc.src.stdio.fgets
     libc.src.stdio.flockfile
     libc.src.stdio.fopen
     libc.src.stdio.fopencookie
@@ -764,29 +825,34 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.stdio.fread
     libc.src.stdio.fread_unlocked
     libc.src.stdio.fseek
+    libc.src.stdio.fseeko
+    libc.src.stdio.ftell
+    libc.src.stdio.ftello
     libc.src.stdio.funlockfile
     libc.src.stdio.fwrite
     libc.src.stdio.fwrite_unlocked
+    libc.src.stdio.getc
+    libc.src.stdio.getc_unlocked
     libc.src.stdio.getchar
     libc.src.stdio.getchar_unlocked
-    #TODO: Look into if fprintf can be enabled for overlay on aarch64
-    libc.src.stdio.fprintf
-    libc.src.stdio.printf
     libc.src.stdio.putc
     libc.src.stdio.putchar
     libc.src.stdio.puts
+    libc.src.stdio.setbuf
+    libc.src.stdio.setvbuf
     libc.src.stdio.stderr
     libc.src.stdio.stdin
     libc.src.stdio.stdout
-    libc.src.stdio.vfprintf
-    libc.src.stdio.vprintf
+    libc.src.stdio.ungetc
 
     # stdlib.h entrypoints
     libc.src.stdlib._Exit
     libc.src.stdlib.abort
+    libc.src.stdlib.at_quick_exit
     libc.src.stdlib.atexit
     libc.src.stdlib.exit
     libc.src.stdlib.getenv
+    libc.src.stdlib.quick_exit
 
     # signal.h entrypoints
     libc.src.signal.kill
@@ -800,6 +866,14 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.signal.signal
     libc.src.signal.sigprocmask
 
+    # spawn.h entrypoints
+    libc.src.spawn.posix_spawn
+    libc.src.spawn.posix_spawn_file_actions_addclose
+    libc.src.spawn.posix_spawn_file_actions_adddup2
+    libc.src.spawn.posix_spawn_file_actions_addopen
+    libc.src.spawn.posix_spawn_file_actions_destroy
+    libc.src.spawn.posix_spawn_file_actions_init
+
     # search.h entrypoints
     libc.src.search.hcreate
     libc.src.search.hcreate_r
@@ -860,6 +934,10 @@ if(LLVM_LIBC_FULL_BUILD)
 
     # sys/select.h entrypoints
     libc.src.sys.select.select
+
+    # sys/socket.h entrypoints
+    libc.src.sys.socket.bind
+    libc.src.sys.socket.socket
   )
 endif()
 
diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 0f363eecc6251..29789f5e2adc2 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -350,12 +350,14 @@ if(NOT LIBC_TARGET_OS_IS_GPU)
 
     list(APPEND SCUDO_DEPS RTScudoStandalone.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
         RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO})
-
-    list(APPEND SCUDO_DEPS
-      RTGwpAsan.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
-      RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
-      RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
-      )
+    
+    if (COMPILER_RT_BUILD_GWP_ASAN)
+      list(APPEND SCUDO_DEPS
+        RTGwpAsan.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
+        RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
+        RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
+        )
+    endif()
 
     add_entrypoint_external(
       malloc

@SchrodingerZhu SchrodingerZhu merged commit 8252d4d into llvm:main Aug 3, 2024
6 checks passed
@SchrodingerZhu SchrodingerZhu deleted the libc/aarch64-bringup branch August 3, 2024 19:22
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 3, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-dbg running on libc-aarch64-ubuntu while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/104/builds/3675

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcSysPrctlTest.GetTHPDisable (2 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[932/1008] Running unit test libc.test.src.sys.auxv.linux.getauxval_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcGetauxvalTest.Basic
[       OK ] LlvmLibcGetauxvalTest.Basic (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[933/1008] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[934/1008] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.strfromd_test.__unit__.__build__
[935/1008] Running unit test libc.test.src.stdlib.strfroml_test.__unit__
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strfroml_test.__unit__ 
cd /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/build/projects/libc/test/src/stdlib && /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/build/projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalFormat (109 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatHexExpFormat (10 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat (0 ns)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalExpFormat (0 ns)
[ RUN      ] LlvmLibcStrfromlTest.ImproperFormatString
[       OK ] LlvmLibcStrfromlTest.ImproperFormatString (4 us)
[ RUN      ] LlvmLibcStrfromlTest.InsufficientBufferSize
[       OK ] LlvmLibcStrfromlTest.InsufficientBufferSize (195 us)
[ RUN      ] LlvmLibcStrfromlTest.InfAndNanValues
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: written
      Which is: 3
To be equal to: static_cast<int>(sizeof("-NAN") - 1)
      Which is: 4
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: buff
      Which is: NAN
To be equal to: "-NAN"
      Which is: -NAN
[  FAILED  ] LlvmLibcStrfromlTest.InfAndNanValues
Ran 7 tests.  PASS: 6  FAIL: 1
[936/1008] Running unit test libc.test.src.stdlib.strfromd_test.__unit__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalFormat (2 ms)
[ RUN      ] LlvmLibcStrfromdTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromdTest.FloatHexExpFormat (7 us)
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalAutoFormat (232 us)
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalExpFormat (102 us)
[ RUN      ] LlvmLibcStrfromdTest.ImproperFormatString
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcSysPrctlTest.GetTHPDisable (2 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[932/1008] Running unit test libc.test.src.sys.auxv.linux.getauxval_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcGetauxvalTest.Basic
[       OK ] LlvmLibcGetauxvalTest.Basic (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[933/1008] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[934/1008] Linking CXX executable projects/libc/test/src/stdlib/libc.test.src.stdlib.strfromd_test.__unit__.__build__
[935/1008] Running unit test libc.test.src.stdlib.strfroml_test.__unit__
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strfroml_test.__unit__ 
cd /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/build/projects/libc/test/src/stdlib && /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/build/projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalFormat (109 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatHexExpFormat (10 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat (0 ns)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalExpFormat (0 ns)
[ RUN      ] LlvmLibcStrfromlTest.ImproperFormatString
[       OK ] LlvmLibcStrfromlTest.ImproperFormatString (4 us)
[ RUN      ] LlvmLibcStrfromlTest.InsufficientBufferSize
[       OK ] LlvmLibcStrfromlTest.InsufficientBufferSize (195 us)
[ RUN      ] LlvmLibcStrfromlTest.InfAndNanValues
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: written
      Which is: 3
To be equal to: static_cast<int>(sizeof("-NAN") - 1)
      Which is: 4
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: buff
      Which is: NAN
To be equal to: "-NAN"
      Which is: -NAN
[  FAILED  ] LlvmLibcStrfromlTest.InfAndNanValues
Ran 7 tests.  PASS: 6  FAIL: 1
[936/1008] Running unit test libc.test.src.stdlib.strfromd_test.__unit__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalFormat (2 ms)
[ RUN      ] LlvmLibcStrfromdTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromdTest.FloatHexExpFormat (7 us)
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalAutoFormat (232 us)
[ RUN      ] LlvmLibcStrfromdTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromdTest.FloatDecimalExpFormat (102 us)
[ RUN      ] LlvmLibcStrfromdTest.ImproperFormatString

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 3, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-fullbuild-dbg running on libc-aarch64-ubuntu while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/3666

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[2651/3600] Running unit test libc.test.src.math.smoke.roundevenf16_test.__unit__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcRoundEvenTest.SpecialNumbers
[       OK ] LlvmLibcRoundEvenTest.SpecialNumbers (4 us)
[ RUN      ] LlvmLibcRoundEvenTest.RoundedNubmers
[       OK ] LlvmLibcRoundEvenTest.RoundedNubmers (1 us)
[ RUN      ] LlvmLibcRoundEvenTest.Fractions
[       OK ] LlvmLibcRoundEvenTest.Fractions (3 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[2652/3600] Running unit test libc.test.src.stdlib.strfroml_test.__unit__
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strfroml_test.__unit__ 
cd /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/projects/libc/test/src/stdlib && /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalFormat (112 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatHexExpFormat (9 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat (1 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalExpFormat (1 us)
[ RUN      ] LlvmLibcStrfromlTest.ImproperFormatString
[       OK ] LlvmLibcStrfromlTest.ImproperFormatString (5 us)
[ RUN      ] LlvmLibcStrfromlTest.InsufficientBufferSize
[       OK ] LlvmLibcStrfromlTest.InsufficientBufferSize (188 us)
[ RUN      ] LlvmLibcStrfromlTest.InfAndNanValues
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: written
      Which is: 3
To be equal to: static_cast<int>(sizeof("-NAN") - 1)
      Which is: 4
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: buff
      Which is: NAN
To be equal to: "-NAN"
      Which is: -NAN
[  FAILED  ] LlvmLibcStrfromlTest.InfAndNanValues
Ran 7 tests.  PASS: 6  FAIL: 1
[2653/3600] Running unit test libc.test.src.math.smoke.ceilf_test.__unit__.__NO_ROUND_OPT
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcCeilTest.SpecialNumbers
[       OK ] LlvmLibcCeilTest.SpecialNumbers (3 us)
[ RUN      ] LlvmLibcCeilTest.RoundedNubmers
[       OK ] LlvmLibcCeilTest.RoundedNubmers (2 us)
[ RUN      ] LlvmLibcCeilTest.Fractions
[       OK ] LlvmLibcCeilTest.Fractions (3 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[2654/3600] Running unit test libc.test.src.math.smoke.getpayloadf_test.__unit__
[==========] Running 2 tests from 1 test suite.
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[2651/3600] Running unit test libc.test.src.math.smoke.roundevenf16_test.__unit__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcRoundEvenTest.SpecialNumbers
[       OK ] LlvmLibcRoundEvenTest.SpecialNumbers (4 us)
[ RUN      ] LlvmLibcRoundEvenTest.RoundedNubmers
[       OK ] LlvmLibcRoundEvenTest.RoundedNubmers (1 us)
[ RUN      ] LlvmLibcRoundEvenTest.Fractions
[       OK ] LlvmLibcRoundEvenTest.Fractions (3 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[2652/3600] Running unit test libc.test.src.stdlib.strfroml_test.__unit__
FAILED: projects/libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strfroml_test.__unit__ 
cd /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/projects/libc/test/src/stdlib && /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/projects/libc/test/src/stdlib/libc.test.src.stdlib.strfroml_test.__unit__.__build__
[==========] Running 7 tests from 1 test suite.
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalFormat (112 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatHexExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatHexExpFormat (9 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalAutoFormat (1 us)
[ RUN      ] LlvmLibcStrfromlTest.FloatDecimalExpFormat
[       OK ] LlvmLibcStrfromlTest.FloatDecimalExpFormat (1 us)
[ RUN      ] LlvmLibcStrfromlTest.ImproperFormatString
[       OK ] LlvmLibcStrfromlTest.ImproperFormatString (5 us)
[ RUN      ] LlvmLibcStrfromlTest.InsufficientBufferSize
[       OK ] LlvmLibcStrfromlTest.InsufficientBufferSize (188 us)
[ RUN      ] LlvmLibcStrfromlTest.InfAndNanValues
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: written
      Which is: 3
To be equal to: static_cast<int>(sizeof("-NAN") - 1)
      Which is: 4
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:478: FAILURE
      Expected: buff
      Which is: NAN
To be equal to: "-NAN"
      Which is: -NAN
[  FAILED  ] LlvmLibcStrfromlTest.InfAndNanValues
Ran 7 tests.  PASS: 6  FAIL: 1
[2653/3600] Running unit test libc.test.src.math.smoke.ceilf_test.__unit__.__NO_ROUND_OPT
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcCeilTest.SpecialNumbers
[       OK ] LlvmLibcCeilTest.SpecialNumbers (3 us)
[ RUN      ] LlvmLibcCeilTest.RoundedNubmers
[       OK ] LlvmLibcCeilTest.RoundedNubmers (2 us)
[ RUN      ] LlvmLibcCeilTest.Fractions
[       OK ] LlvmLibcCeilTest.Fractions (3 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[2654/3600] Running unit test libc.test.src.math.smoke.getpayloadf_test.__unit__
[==========] Running 2 tests from 1 test suite.

@SchrodingerZhu
Copy link
Contributor Author

not failing on my machine.

kutemeikito added a commit to kutemeikito/llvm-project that referenced this pull request Aug 4, 2024
* 'main' of https://github.com/llvm/llvm-project:
  [RISCV] Improve hasAllNBitUsers for users of SLLI.
  [RISCV] Invert if conditions in the switch in RISCVDAGToDAGISel::hasAllNBitUsers. NFC
  [Transforms] Construct SmallVector with ArrayRef (NFC) (llvm#101851)
  [RISCV] Capitalize some variable names. NFC
  [sanitizer_common] Fix UnwindFast on SPARC (llvm#101634)
  [builtins] Fix divtc3.c etc. compilation on Solaris/SPARC with gcc (llvm#101662)
  [NFC][asan] Track current dynamic init module (llvm#101597)
  [libc] enable most of the entrypoints on aarch64 (llvm#101797)
  [SandboxIR][Tracker] Track InsertIntoBB (llvm#101595)
  [SCEV] Use const SCEV * explicitly in more places.
  [ELF] Move outputSections into Ctx. NFC
  [ELF] Move ElfSym into Ctx. NFC
  [ELF] Move Out into Ctx. NFC
  [test][asan] Fix the test checks
  [NFC][asan] Switch from list to DynInitGlobalsByModule (llvm#101596)

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
banach-space pushed a commit to banach-space/llvm-project that referenced this pull request Aug 7, 2024
This is a non-feature change that enables most of the entrypoints for
aarch64 based runtime builds. It fixes an additional problem that some
compiler-rt targets are not defined at the time of dependency checking
thus leading to false-negatives.
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this pull request Aug 15, 2024
This is a non-feature change that enables most of the entrypoints for
aarch64 based runtime builds. It fixes an additional problem that some
compiler-rt targets are not defined at the time of dependency checking
thus leading to false-negatives.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants