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

Does the tests support AddressSanitizer with MSVC? #586

Open
wmyyy opened this issue Nov 23, 2021 · 0 comments
Open

Does the tests support AddressSanitizer with MSVC? #586

wmyyy opened this issue Nov 23, 2021 · 0 comments

Comments

@wmyyy
Copy link

wmyyy commented Nov 23, 2021

Hi All,

I have build annoy project with vs 2019 native tools command prompt and use AddressSanitizer by below steps and run tests:

  1. pip install numpy h5py
  2. set _ CL _= /fsanitize=address /GS- /wd5072 & set _ LINK _= /InferASanLibs /incremental:no /debug
  3. python setup.py build
  4. python setup.py nosetests

when run test hit below errors, could you please help confirm if the project tests support AddressSanitizer? Thanks a lot!

ERROR: Failure: ImportError (DLL load failed while importing annoylib: The specified module could not be found.)
Traceback (most recent call last):
File "f:\gitp\spotify\annoy.eggs\nose-1.3.7-py3.9.egg\nose\failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "f:\gitp\spotify\annoy.eggs\nose-1.3.7-py3.9.egg\nose\loader.py", line 417, in loadTestsFromName
module = self.importer.importFromPath(
File "f:\gitp\spotify\annoy.eggs\nose-1.3.7-py3.9.egg\nose\importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "f:\gitp\spotify\annoy.eggs\nose-1.3.7-py3.9.egg\nose\importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "C:\Python39\lib\imp.py", line 234, in load_module
return load_source(name, filename, file)
File "C:\Python39\lib\imp.py", line 171, in load_source
module = _load(spec)
File "", line 711, in _load
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "F:\gitP\spotify\annoy\test\on_disk_build_test.py", line 16, in
from annoy import AnnoyIndex
File "F:\gitP\spotify\annoy\annoy_init
.py", line 16, in
from .annoylib import Annoy as AnnoyIndex
ImportError: DLL load failed while importing annoylib: The specified module could not be found.

======================================================================

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

No branches or pull requests

1 participant