Subject: Discussion related to cado-nfs
List archive
- From: Emmanuel Thomé <Emmanuel.Thome@inria.fr>
- To: Thomas Bailleux <thomas@bailleux.me>
- Cc: cado-nfs-discuss@lists.gforge.inria.fr
- Subject: Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30
- Date: Mon, 29 Apr 2019 21:54:41 +0200
- List-archive: <http://lists.gforge.inria.fr/pipermail/cado-nfs-discuss/>
- List-id: A discussion list for Cado-NFS <cado-nfs-discuss.lists.gforge.inria.fr>
On Mon, Apr 29, 2019 at 04:55:12PM +0200, Emmanuel Thomé wrote:
> [...]
> "movl %[op], %%eax\n"
> "movl %[ecx], %%ecx\n"
> "cpuid\n"
> [...]
>
> It is clear that the compiler has absolutely no reason to not use (%rax)
> as a substitute for %[edx]. I'll fix it shortly.
I meant for %[ecx].
I think it is now fixed (commit d6ebcd34f).
As a matter of fact, this is not really a bug that shows the usefulness
of asan per se -- the trigger is rather the fact that the compiler had
the liberty to assign registers in a way that was bound to crash, and so
it did.
But I think we could consider having a check based on these clang goodies
(we already have a full valgrind automated test, so that would be an
extra safety net).
E.
>
> E.
>
> On Mon, Apr 29, 2019 at 04:18:13PM +0200, Thomas Bailleux wrote:
> > Bonjour,
> >
> > J'ai compilé CADO-NFS avec Clang 8, et ASAN activé. Le test "full_c30"
> > échoue à cause d'une segfault. Voici la trace ASAN:
> >
> > Debug:Polynomial Selection (root optimized): Return code is: 1
> > Debug:Polynomial Selection (root optimized): stderr is:
> > b'AddressSanitizer:DEADLYSIGNAL
> > =================================================================
> > ==2902==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004
> > (pc 0x564a173fb330 bp 0x7ffed0fa8e10 sp 0x7ffed0fa8c60 T0)
> > ==2902==The signal is caused by a READ memory access.
> > ==2902==Hint: address points to the zero page.
> > #0 0x564a173fb32f in cpuid2
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:80:5
> > #1 0x564a173fef85 in update_intel_byte
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:450:6
> > #2 0x564a174004d5 in print_intel_cache
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:491:5
> > #3 0x564a173ff2cb in cachesize_cpuid
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:562:13
> > #4 0x564a1731971e in ropt_L1_cachesize
> > /home/zadig/LORIA/travail/cado-nfs/polyselect/ropt_io.c:20:22
> > #5 0x564a172e876c in main
> > /home/zadig/LORIA/travail/cado-nfs/polyselect/ropt_main.c:832:3
> > #6 0x7f153daf1ce2 in __libc_start_main (/usr/lib/libc.so.6+0x23ce2)
> > #7 0x564a171ceb0d in _start (/tmp/cado.r228
> > b2pr/client/download/polyselect_ropt+0x5cb0d)
> >
> > AddressSanitizer can not provide additional info.
> > SUMMARY: AddressSanitizer: SEGV
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:80:5 in cpuid2
> > ==2902==ABORTING
> >
> > Error:Polynomial Selection (root optimized): Program run on localhost
> > failed with exit code 1
> > Error:Polynomial Selection (root optimized): Stderr output (last 10 lines
> > only) follow (stored in file
> > /tmp/cado.r228b2pr/c30.upload/c30_polyselect2_0#2.hvcfzhz8.stderr0):
> > Error:Polynomial Selection (root optimized): #3 0x564a173ff2cb in
> > cachesize_cpuid
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:562:13
> > Error:Polynomial Selection (root optimized): #4 0x564a1731971e in
> > ropt_L1_cachesize
> > /home/zadig/LORIA/travail/cado-nfs/polyselect/ropt_io.c:20:22
> > Error:Polynomial Selection (root optimized): #5 0x564a172e876c in
> > main /home/zadig/LORIA/travail/cado-nfs/polyselect/ropt_main.c:832:3
> > Error:Polynomial Selection (root optimized): #6 0x7f153daf1ce2 in
> > __libc_start_main (/usr/lib/libc.so.6+0x23ce2)
> > Error:Polynomial Selection (root optimized): #7 0x564a171ceb0d in
> > _start (/tmp/cado.r228b2pr/client/download/polyselect_ropt+0x5cb0d)
> > Error:Polynomial Selection (root optimized):
> > Error:Polynomial Selection (root optimized): AddressSanitizer can not
> > provide additional info.
> > Error:Polynomial Selection (root optimized): SUMMARY:
> > AddressSanitizer: SEGV
> > /home/zadig/LORIA/travail/cado-nfs/utils/cachesize_cpuid.c:80:5 in cpuid2
> > Error:Polynomial Selection (root optimized): ==2902==ABORTING
> > Error:Polynomial Selection (root optimized):
> >
> > J'utilise la dernière version, disponible sur le git
> > (bf5ba257b86ff4765d2bc1e5b5caa42ca0d63d62).
> >
> > Output de make cmake:
> >
> > -- Looking for waitpid
> > -- Looking for waitpid - found
> > -- Looking for ctime_r
> > -- Looking for ctime_r - found
> > -- Looking for realpath
> > -- Looking for realpath - found
> > -- Looking for mmap
> > -- Looking for mmap - found
> > -- Looking for sysconf
> > -- Looking for sysconf - found
> > -- Testing whether RUSAGE_THREAD can be used
> > -- Trying to compile with RUSAGE_THREAD -- Success
> > -- Testing the existence of __sync_fetch functions
> > -- Testing the existence of __sync_fetch functions -- Success
> > -- Testing the existence of asprintf/vasprintf functions
> > -- Testing the existence of asprintf/vasprintf functions -- Success
> > -- Checking for MinGW
> > -- Checking for MinGW -- no
> > -- Testing if rand() gives true alea
> > -- Testing if rand() gives true alea -- Probably
> > -- Testing if srand() yields a deterministic sequence
> > -- Testing if srand() yields a deterministic sequence -- Yes
> > -- HWLOC_INCDIR=/usr/include
> > -- HWLOC_LIB=/usr/lib/libhwloc.so
> > -- GMPECM_INCDIR=GMPECM_INCDIR-NOTFOUND
> > -- GMPECM_LIB=GMPECM_LIB-NOTFOUND
> > -- /usr/bin/python3 --version returned: Python 3.7.3
> > -- Importing module sqlite3 in Python succeeded.
> > -- Perl version is 5.28.2
> > -- Testing whether C++11 alignas() can be used
> > -- Testing whether C++11 alignas() can be used -- yes
> > -- Testing whether C++11 glibc vector internals can be used -- yes
> > -- Building with static libraries (ENABLE_SHARED="")
> > -- Looking for pthread_create
> > -- Looking for pthread_create - found
> > -- Looking for pthread_barrier_wait
> > -- Looking for pthread_barrier_wait - found
> > -- MPI is not enabled
> > -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
> > -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS
> > OpenMP_CXX_LIB_NAMES)
> > -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
> > -- Using libs: (math) (pthreads)
> > -- GF(p) implementations enabled for DL linear algebra: p_1, p_2, p_3,
> > p_4, p_5, p_6, p_7, p_8, p_9, p_10, p_11, p_12, p_13, p_14, p_15, pz
> > -- GF(p) SpMV backends for DL linear algebra: basicp, zone
> > -- GF(2) implementations enabled for linear algebra: u64k1, u64k2, u64k3,
> > u64k4
> > -- GF(2) SpMV backends for linear algebra: bucket, basic, sliced
> > -- Main scripts will go to
> > /home/zadig/LORIA/travail/cado-nfs/installed/bin
> > -- Libraries and binaries will go to
> > /home/zadig/LORIA/travail/cado-nfs/installed/lib/cado-nfs-3.0.0
> > -- Data will go to
> > /home/zadig/LORIA/travail/cado-nfs/installed/share/cado-nfs-3.0.0
> > -- Configuring done
> > -- Generating done
> > -- Build files have been written to:
> > /home/zadig/LORIA/travail/cado-nfs/build/vannes
> >
> > Je vous joins mon local.sh.
> >
> > J'utilise clang8:
> >
> > $ clang++ --version
> > clang version 8.0.0 (tags/RELEASE_800/final)
> > Target: x86_64-pc-linux-gnu
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> > Bien à vous,
> >
> > Thomas
> >
>
>
>
>
>
>
> > _______________________________________________
> > Cado-nfs-discuss mailing list
> > Cado-nfs-discuss@lists.gforge.inria.fr
> > https://lists.gforge.inria.fr/mailman/listinfo/cado-nfs-discuss
>
> _______________________________________________
> Cado-nfs-discuss mailing list
> Cado-nfs-discuss@lists.gforge.inria.fr
> https://lists.gforge.inria.fr/mailman/listinfo/cado-nfs-discuss
- [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Thomas Bailleux, 04/29/2019
- Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Emmanuel Thomé, 04/29/2019
- Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Emmanuel Thomé, 04/29/2019
- Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Thomas Bailleux, 04/29/2019
- Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Emmanuel Thomé, 04/29/2019
- Re: [Cado-nfs-discuss] SIGSEGV sur le test full_c30, Emmanuel Thomé, 04/29/2019
Archive powered by MHonArc 2.6.19+.