annoy icon indicating copy to clipboard operation
annoy copied to clipboard

Does the tests support AddressSanitizer with MSVC?

Open wmyyy opened this issue 4 years ago • 0 comments

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.

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

wmyyy avatar Nov 23 '21 09:11 wmyyy