Re: [Evolution] [RFH] Using the memory error detector AddressSanitizer (ASan)



Am Dienstag, den 05.05.2015, 13:11 +0000 schrieb Reid Thompson:
On Tue, 2015-05-05 at 07:55 +0200, Paul Menzel wrote:
Am Samstag, den 02.05.2015, 11:58 +0000 schrieb Joakim Tjernlund:
You need to set LDFLAGS too

Unfortunately it still fails to build when passing
`LDFLAGS='-fsanitize=address'`.

what is your complete build command and the error output

        $ CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" 
./autogen.sh --disable-uoa
        $ CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" make V=1
        […]
        /bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeprecated-declarations 
-Werror-implicit-function-declaration -Wformat-security -Winit-self -Wmissing-declarations 
-Wmissing-include-dirs -Wmissing-noreturn -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings 
-Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter 
-Wnested-externs -fno-strict-aliasing -O1 -g -fsanitize=address -fno-omit-frame-pointer -version-info 49:0:0  
  -fsanitize=address -Wl,--no-undefined -o libcamel-1.2.la -rpath /usr/local/lib 
libcamel_1_2_la-camel-enumtypes.lo libcamel_1_2_la-camel-address.lo libcamel_1_2_la-camel-async-closure.lo 
libcamel_1_2_la-camel-block-file.lo libcamel_1_2_la-camel-certdb.lo libcamel_1_2_la-camel-charset-map.lo 
libcamel_1_2_la-camel-cipher-context.lo libcamel_1_2_la-camel-data-cache.lo 
libcamel_1_2_la-camel-data-wrapper.lo libcamel_1_2_la-camel-db.lo libcamel_1_2_la-camel-debug.lo 
libcamel_1_2_la-camel-file-utils.lo libcamel_1_2_la-camel-filter-driver.lo 
libcamel_1_2_la-camel-filter-input-stream.lo libcamel_1_2_la-camel-filter-output-stream.lo 
libcamel_1_2_la-camel-filter-search.lo libcamel_1_2_la-camel-folder-search.lo 
libcamel_1_2_la-camel-folder-summary.lo libcamel_1_2_la-camel-folder-thread.lo 
libcamel_1_2_la-camel-folder.lo libcamel_1_2_la-camel-gpg-context.lo libcamel_1_2_la-camel-html-parser.lo 
libcamel_1_2_la-camel-iconv.lo libcamel_1_2_la-camel-index.lo libcamel_1_2_la-camel-internet-address.lo 
libcamel_1_2_la-camel-junk-filter.lo libcamel_1_2_la-camel-local-settings.lo libcamel_1_2_la-camel-lock.lo 
libcamel_1_2_la-camel-medium.lo libcamel_1_2_la-camel-memchunk.lo libcamel_1_2_la-camel-mempool.lo 
libcamel_1_2_la-camel-mime-filter-basic.lo libcamel_1_2_la-camel-mime-filter-bestenc.lo 
libcamel_1_2_la-camel-mime-filter-canon.lo libcamel_1_2_la-camel-mime-filter-charset.lo 
libcamel_1_2_la-camel-mime-filter-crlf.lo libcamel_1_2_la-camel-mime-filter-enriched.lo 
libcamel_1_2_la-camel-mime-filter-from.lo libcamel_1_2_la-camel-mime-filter-gzip.lo 
libcamel_1_2_la-camel-mime-filter-html.lo libcamel_1_2_la-camel-mime-filter-index.lo 
libcamel_1_2_la-camel-mime-filter-linewrap.lo libcamel_1_2_la-camel-mime-filter-pgp.lo 
libcamel_1_2_la-camel-mime-filter-progress.lo libcamel_1_2_la-camel-mime-filter-tohtml.lo 
libcamel_1_2_la-camel-mime-filter-windows.lo libcamel_1_2_la-camel-mime-filter-yenc.lo 
libcamel_1_2_la-camel-mime-filter.lo libcamel_1_2_la-camel-mime-message.lo 
libcamel_1_2_la-camel-mime-parser.lo libcamel_1_2_la-camel-mime-part-utils.lo 
libcamel_1_2_la-camel-mime-part.lo libcamel_1_2_la-camel-mime-tables.lo libcamel_1_2_la-camel-mime-utils.lo 
libcamel_1_2_la-camel-msgport.lo libcamel_1_2_la-camel-multipart-encrypted.lo 
libcamel_1_2_la-camel-multipart-signed.lo libcamel_1_2_la-camel-multipart.lo 
libcamel_1_2_la-camel-net-utils.lo libcamel_1_2_la-camel-network-service.lo 
libcamel_1_2_la-camel-network-settings.lo libcamel_1_2_la-camel-nntp-address.lo 
libcamel_1_2_la-camel-null-output-stream.lo libcamel_1_2_la-camel-object-bag.lo 
libcamel_1_2_la-camel-object.lo libcamel_1_2_la-camel-offline-folder.lo 
libcamel_1_2_la-camel-offline-settings.lo libcamel_1_2_la-camel-offline-store.lo 
libcamel_1_2_la-camel-operation.lo libcamel_1_2_la-camel-partition-table.lo libcamel_1_2_la-camel-provider.lo 
libcamel_1_2_la-camel-sasl-anonymous.lo libcamel_1_2_la-camel-sasl-cram-md5.lo 
libcamel_1_2_la-camel-sasl-digest-md5.lo libcamel_1_2_la-camel-sasl-gssapi.lo 
libcamel_1_2_la-camel-sasl-login.lo libcamel_1_2_la-camel-sasl-ntlm.lo libcamel_1_2_la-camel-sasl-plain.lo 
libcamel_1_2_la-camel-sasl-popb4smtp.lo libcamel_1_2_la-camel-sasl.lo libcamel_1_2_la-camel-search-private.lo 
libcamel_1_2_la-camel-search-sql-sexp.lo libcamel_1_2_la-camel-service.lo libcamel_1_2_la-camel-session.lo 
libcamel_1_2_la-camel-settings.lo libcamel_1_2_la-camel-sexp.lo libcamel_1_2_la-camel-smime-context.lo 
libcamel_1_2_la-camel-store-settings.lo libcamel_1_2_la-camel-store-summary.lo libcamel_1_2_la-camel-store.lo 
libcamel_1_2_la-camel-stream-buffer.lo libcamel_1_2_la-camel-stream-filter.lo 
libcamel_1_2_la-camel-stream-fs.lo libcamel_1_2_la-camel-stream-mem.lo libcamel_1_2_la-camel-stream-null.lo 
libcamel_1_2_la-camel-stream.lo libcamel_1_2_la-camel-string-utils.lo libcamel_1_2_la-camel-subscribable.lo 
libcamel_1_2_la-camel-text-index.lo libcamel_1_2_la-camel-transport.lo libcamel_1_2_la-camel-trie.lo 
libcamel_1_2_la-camel-uid-cache.lo libcamel_1_2_la-camel-url-scanner.lo libcamel_1_2_la-camel-url.lo 
libcamel_1_2_la-camel-utf8.lo libcamel_1_2_la-camel-vee-data-cache.lo libcamel_1_2_la-camel-vee-folder.lo 
libcamel_1_2_la-camel-vee-store.lo libcamel_1_2_la-camel-vee-summary.lo 
libcamel_1_2_la-camel-vtrash-folder.lo libcamel_1_2_la-camel.lo libcamel_1_2_la-camel-lock-client.lo 
libcamel_1_2_la-camel-movemail.lo libcamel_1_2_la-camel-stream-process.lo   -lgio-2.0 -lgobject-2.0 
-Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 
-lnspr4 -lsqlite3  -lz    -licui18n -licuuc -licudata        
        libtool: link: gcc -shared  -fPIC -DPIC  .libs/libcamel_1_2_la-camel-enumtypes.o 
.libs/libcamel_1_2_la-camel-address.o .libs/libcamel_1_2_la-camel-async-closure.o 
.libs/libcamel_1_2_la-camel-block-file.o .libs/libcamel_1_2_la-camel-certdb.o 
.libs/libcamel_1_2_la-camel-charset-map.o .libs/libcamel_1_2_la-camel-cipher-context.o 
.libs/libcamel_1_2_la-camel-data-cache.o .libs/libcamel_1_2_la-camel-data-wrapper.o 
.libs/libcamel_1_2_la-camel-db.o .libs/libcamel_1_2_la-camel-debug.o .libs/libcamel_1_2_la-camel-file-utils.o 
.libs/libcamel_1_2_la-camel-filter-driver.o .libs/libcamel_1_2_la-camel-filter-input-stream.o 
.libs/libcamel_1_2_la-camel-filter-output-stream.o .libs/libcamel_1_2_la-camel-filter-search.o 
.libs/libcamel_1_2_la-camel-folder-search.o .libs/libcamel_1_2_la-camel-folder-summary.o 
.libs/libcamel_1_2_la-camel-folder-thread.o .libs/libcamel_1_2_la-camel-folder.o 
.libs/libcamel_1_2_la-camel-gpg-context.o .libs/libcamel_1_2_la-camel-html-parser.o 
.libs/libcamel_1_2_la-camel-iconv.o .libs/libcamel_1_2_la-camel-index.o 
.libs/libcamel_1_2_la-camel-internet-address.o .libs/libcamel_1_2_la-camel-junk-filter.o 
.libs/libcamel_1_2_la-camel-local-settings.o .libs/libcamel_1_2_la-camel-lock.o 
.libs/libcamel_1_2_la-camel-medium.o .libs/libcamel_1_2_la-camel-memchunk.o 
.libs/libcamel_1_2_la-camel-mempool.o .libs/libcamel_1_2_la-camel-mime-filter-basic.o 
.libs/libcamel_1_2_la-camel-mime-filter-bestenc.o .libs/libcamel_1_2_la-camel-mime-filter-canon.o 
.libs/libcamel_1_2_la-camel-mime-filter-charset.o .libs/libcamel_1_2_la-camel-mime-filter-crlf.o 
.libs/libcamel_1_2_la-camel-mime-filter-enriched.o .libs/libcamel_1_2_la-camel-mime-filter-from.o 
.libs/libcamel_1_2_la-camel-mime-filter-gzip.o .libs/libcamel_1_2_la-camel-mime-filter-html.o 
.libs/libcamel_1_2_la-camel-mime-filter-index.o .libs/libcamel_1_2_la-camel-mime-filter-linewrap.o 
.libs/libcamel_1_2_la-camel-mime-filter-pgp.o .libs/libcamel_1_2_la-camel-mime-filter-progress.o 
.libs/libcamel_1_2_la-camel-mime-filter-tohtml.o .libs/libcamel_1_2_la-camel-mime-filter-windows.o 
.libs/libcamel_1_2_la-camel-mime-filter-yenc.o .libs/libcamel_1_2_la-camel-mime-filter.o 
.libs/libcamel_1_2_la-camel-mime-message.o .libs/libcamel_1_2_la-camel-mime-parser.o 
.libs/libcamel_1_2_la-camel-mime-part-utils.o .libs/libcamel_1_2_la-camel-mime-part.o 
.libs/libcamel_1_2_la-camel-mime-tables.o .libs/libcamel_1_2_la-camel-mime-utils.o 
.libs/libcamel_1_2_la-camel-msgport.o .libs/libcamel_1_2_la-camel-multipart-encrypted.o 
.libs/libcamel_1_2_la-camel-multipart-signed.o .libs/libcamel_1_2_la-camel-multipart.o 
.libs/libcamel_1_2_la-camel-net-utils.o .libs/libcamel_1_2_la-camel-network-service.o 
.libs/libcamel_1_2_la-camel-network-settings.o .libs/libcamel_1_2_la-camel-nntp-address.o 
.libs/libcamel_1_2_la-camel-null-output-stream.o .libs/libcamel_1_2_la-camel-object-bag.o 
.libs/libcamel_1_2_la-camel-object.o .libs/libcamel_1_2_la-camel-offline-folder.o 
.libs/libcamel_1_2_la-camel-offline-settings.o .libs/libcamel_1_2_la-camel-offline-store.o 
.libs/libcamel_1_2_la-camel-operation.o .libs/libcamel_1_2_la-camel-partition-table.o 
.libs/libcamel_1_2_la-camel-provider.o .libs/libcamel_1_2_la-camel-sasl-anonymous.o 
.libs/libcamel_1_2_la-camel-sasl-cram-md5.o .libs/libcamel_1_2_la-camel-sasl-digest-md5.o 
.libs/libcamel_1_2_la-camel-sasl-gssapi.o .libs/libcamel_1_2_la-camel-sasl-login.o 
.libs/libcamel_1_2_la-camel-sasl-ntlm.o .libs/libcamel_1_2_la-camel-sasl-plain.o 
.libs/libcamel_1_2_la-camel-sasl-popb4smtp.o .libs/libcamel_1_2_la-camel-sasl.o 
.libs/libcamel_1_2_la-camel-search-private.o .libs/libcamel_1_2_la-camel-search-sql-sexp.o 
.libs/libcamel_1_2_la-camel-service.o .libs/libcamel_1_2_la-camel-session.o 
.libs/libcamel_1_2_la-camel-settings.o .libs/libcamel_1_2_la-camel-sexp.o 
.libs/libcamel_1_2_la-camel-smime-context.o .libs/libcamel_1_2_la-camel-store-settings.o 
.libs/libcamel_1_2_la-camel-store-summary.o .libs/libcamel_1_2_la-camel-store.o 
.libs/libcamel_1_2_la-camel-stream-buffer.o .libs/libcamel_1_2_la-camel-stream-filter.o 
.libs/libcamel_1_2_la-camel-stream-fs.o .libs/libcamel_1_2_la-camel-stream-mem.o 
.libs/libcamel_1_2_la-camel-stream-null.o .libs/libcamel_1_2_la-camel-stream.o 
.libs/libcamel_1_2_la-camel-string-utils.o .libs/libcamel_1_2_la-camel-subscribable.o 
.libs/libcamel_1_2_la-camel-text-index.o .libs/libcamel_1_2_la-camel-transport.o 
.libs/libcamel_1_2_la-camel-trie.o .libs/libcamel_1_2_la-camel-uid-cache.o 
.libs/libcamel_1_2_la-camel-url-scanner.o .libs/libcamel_1_2_la-camel-url.o 
.libs/libcamel_1_2_la-camel-utf8.o .libs/libcamel_1_2_la-camel-vee-data-cache.o 
.libs/libcamel_1_2_la-camel-vee-folder.o .libs/libcamel_1_2_la-camel-vee-store.o 
.libs/libcamel_1_2_la-camel-vee-summary.o .libs/libcamel_1_2_la-camel-vtrash-folder.o 
.libs/libcamel_1_2_la-camel.o .libs/libcamel_1_2_la-camel-lock-client.o 
.libs/libcamel_1_2_la-camel-movemail.o .libs/libcamel_1_2_la-camel-stream-process.o   -lgio-2.0 -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0 -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 
/usr/lib/i386-linux-gnu/libsqlite3.so -lz -licui18n -licuuc -licudata  -O1 -Wl,--no-undefined 
-Wl,--export-dynamic -pthread   -pthread -Wl,-soname -Wl,libcamel-1.2.so.49 -o .libs/libcamel-1.2.so.49.0.0
        […]
        .libs/libcamel_1_2_la-camel-stream-process.o: In function `camel_stream_process_connect':
        /mnt/evolution-data-server/camel/camel-stream-process.c:248: undefined reference to 
`__asan_option_detect_stack_use_after_return'
        /mnt/evolution-data-server/camel/camel-stream-process.c:248: undefined reference to 
`__asan_stack_malloc_1'
        /mnt/evolution-data-server/camel/camel-stream-process.c:251: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:251: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:254: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:254: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:260: undefined reference to 
`__asan_report_store4'
        .libs/libcamel_1_2_la-camel-stream-process.o: In function `do_exec_command':
        /mnt/evolution-data-server/camel/camel-stream-process.c:204: undefined reference to 
`__asan_handle_no_return'
        /mnt/evolution-data-server/camel/camel-stream-process.c:206: undefined reference to 
`__asan_handle_no_return'
        /mnt/evolution-data-server/camel/camel-stream-process.c:216: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:232: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:237: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:238: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:238: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:240: undefined reference to 
`__asan_handle_no_return'
        .libs/libcamel_1_2_la-camel-stream-process.o: In function `camel_stream_process_connect':
        /mnt/evolution-data-server/camel/camel-stream-process.c:266: undefined reference to 
`__asan_report_store4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:271: undefined reference to 
`__asan_report_store4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:276: undefined reference to 
`__asan_report_load4'
        /mnt/evolution-data-server/camel/camel-stream-process.c:284: undefined reference to 
`__asan_report_load4'
        .libs/libcamel_1_2_la-camel-stream-process.o: In function 
`_GLOBAL__sub_D_00099_0_camel_stream_process.c':
        /mnt/evolution-data-server/camel/camel-stream-process.c:289: undefined reference to 
`__asan_unregister_globals'
        .libs/libcamel_1_2_la-camel-stream-process.o: In function 
`_GLOBAL__sub_I_00099_1_camel_stream_process.c':
        /mnt/evolution-data-server/camel/camel-stream-process.c:289: undefined reference to `__asan_init_v3'
        /mnt/evolution-data-server/camel/camel-stream-process.c:289: undefined reference to 
`__asan_register_globals'
        collect2: error: ld returned 1 exit status
        Makefile:1181: recipe for target 'libcamel-1.2.la' failed
        make[4]: *** [libcamel-1.2.la] Error 1
        make[4]: Leaving directory '/mnt/evolution-data-server/camel'
        Makefile:2288: recipe for target 'all-recursive' failed
        make[3]: *** [all-recursive] Error 1
        make[3]: Leaving directory '/mnt/evolution-data-server/camel'
        Makefile:1108: recipe for target 'all' failed
        make[2]: *** [all] Error 2
        make[2]: Leaving directory '/mnt/evolution-data-server/camel'
        Makefile:751: recipe for target 'all-recursive' failed
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory '/mnt/evolution-data-server'
        Makefile:659: recipe for target 'all' failed
        make: *** [all] Error 2


Thanks,

Paul

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]