Comments (15)
You might need to compile DynamoRIO from source yourself first. I think there were some changes in VS 2015 compared to the previous versions that might be causing this problem. This might be a related issue to DynamoRIO/dynamorio#1902
The WinAFL binaries provided in the repo were built with VS 10.
from winafl.
@cynicXer check DynamoRIO/dynamorio#2125 and DynamoRIO/dynamorio#1902 - this should be fixed if you use the trunk version :).
Cheers
from winafl.
I'm experiencing the same problems with Windows 10 x86. I've double checked the cmake files and have installed the VC runtime libraries multiple times.
The error is around resolving c functions like _snprintf. I've followed all of the 'fixes' but the error is still there. I can't build Dynamorio or WinAFL due to this issue.
Environment: Windows 10 x86 - Visual Studio 15 Community.
from winafl.
from winafl.
Hey! I'll run the build again in a moment. I just need to boot up my Virtual Machine.
I suspect that VS2015 is the culprit since I had problems building dynamorio and opened a case with them: DynamoRIO/dynamorio#2166
As far as the SDK I'm using the following:
- Windows 10 SDK
- .NET SDK (Included in the WinDBG SDK setup)
If I'm able to fix the issue then I'll submit a pull req :)
from winafl.
from winafl.
Cool! I'll give this a shot in a few hours. :)
from winafl.
@b1ack0wl did it work :)?
Cheers
from winafl.
Hey! I might need some assistance with modifying the cmake files to include the stdio definitions. I took a small stab at it but still ended up with linking problems (same as before).
from winafl.
from winafl.
I added the statement but I'm still seeing the same issues. I'm using the pre-compiled version of DynamoRIO-6.2.0-2 to build WinAFL against since their CMakeFile is gonna take some time to take apart.
Build FAILED.
"C:\Users\WinAFL\Desktop\winafl-master\build32\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj" (default target) (6) ->
(Link target) ->
libcmt.lib(dll_dllmain.obj) : error LNK2019: unresolved external symbol __initterm referenced in function "int __cdec
l dllmain_crt_process_attach(struct HINSTANCE__ * const,void * const)" (?dllmain_crt_process_attach@@YAHQAUHINSTANCE__@
@QAX@Z) [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(dll_dllmain.obj) : error LNK2019: unresolved external symbol __initterm_e referenced in function "int __cd
ecl dllmain_crt_process_attach(struct HINSTANCE__ * const,void * const)" (?dllmain_crt_process_attach@@YAHQAUHINSTANCE_
_@@QAX@Z) [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(dll_dllmain.obj) : error LNK2001: unresolved external symbol __except_handler4 [C:\Users\WinAFL\Desktop\wi
nafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2001: unresolved external symbol __except_handler4 [C:\Users\WinAFL\Desktop\winafl
-master\build32\winafl.vcxproj]
libcmt.lib(_sehprolg4_.obj) : error LNK2001: unresolved external symbol __except_handler4 [C:\Users\WinAFL\Desktop\wi
nafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __seh_filter_dll referenced in function ___scrt_d
llmain_exception_filter [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __configure_narrow_argv referenced in function "p
ublic: static int __cdecl __scrt_narrow_argv_policy::configure_argv(void)" (?configure_argv@__scrt_narrow_argv_policy@@
SAHXZ) [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __initialize_narrow_environment referenced in fun
ction ___scrt_dllmain_after_initialize_c [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __initialize_onexit_table referenced in function
___scrt_initialize_onexit_tables [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __register_onexit_function referenced in function
__onexit [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __execute_onexit_table referenced in function ___
scrt_dllmain_uninitialize_c [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __crt_atexit referenced in function __onexit [C:\
Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __crt_at_quick_exit referenced in function _at_qu
ick_exit [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility.obj) : error LNK2019: unresolved external symbol __cexit referenced in function ___scrt_dllmain_un
initialize_c [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
libcmt.lib(tncleanup.obj) : error LNK2019: unresolved external symbol ___std_type_info_destroy_list referenced in fun
ction "void __cdecl __scrt_uninitialize_type_info(void)" (?__scrt_uninitialize_type_info@@YAXXZ) [C:\Users\WinAFL\Deskt
op\winafl-master\build32\winafl.vcxproj]
libcmt.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol _terminate referenced in function ___scrt
_unhandled_exception_filter@4 [C:\Users\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
C:\Users\WinAFL\Desktop\winafl-master\build32\Release\winafl.dll : fatal error LNK1120: 14 unresolved externals [C:\U
sers\WinAFL\Desktop\winafl-master\build32\winafl.vcxproj]
0 Warning(s)
17 Error(s)
I'll keep playing around with the CMakeLists file just in case I placed the statement in the wrong place. Thanks for helping me walk through this, I'm a big GNU guy so Windows has been my kryptonite for years :P
from winafl.
I got it! I added the following and now it builds with 0 issues
target_link_libraries(winafl "legacy_stdio_definitions.lib")
target_link_libraries(winafl "vcruntimed.lib")
target_link_libraries(winafl "ucrtd.lib")
target_link_libraries(winafl "msvcrt.lib")
I'm going to clean up the CMakeLists.txt file and then submit a pull request. :)
Thank you again for the help!
from winafl.
from winafl.
Good catch! I didn't realize that I linked the Debug libraries. I'll submit a pull request later on today (~3-4 hours from now)
Edit: Doing some last minute tests before submitting the pull req.
from winafl.
Thanks for the fix! I'm closing this bug.
from winafl.
Related Issues (20)
- Yes, I am use attach by add option -A, But it seems no function. below is my command. HOT 1
- Cannot run simple test due to timeout HOT 4
- Update docs HOT 3
- Facing Issues with Offset Calculation and Starting Fuzzing in WinAFL HOT 2
- Compilation failed HOT 3
- Documented build commands do not generate winafl.dll HOT 9
- How to stop WinAFL properly? HOT 1
- Winafl + Libprotobuf-mutator
- WinAFL Internal Crash at PC 0x5a1a456e HOT 6
- PROGRAM ABORT : Unexpected result from pipe! expected 'P', instead received '' HOT 1
- ERROR while building winafl HOT 1
- Error: Can't open .cur_input
- drrun.exe and afl-fuzz.exe giving error when -fsanitize=address flag given to compile target
- PROGRAM ABORT : Test case 'id_000000' results in a crash HOT 3
- Occur time out when init test case
- Incorrect detection count threads on multiCPU motherboards HOT 2
- Winafl doesn't want to start, reading other issues didn't help
- PROGRAM ABORT : CreateNamedPipe failed, GLE=231 HOT 2
- tmin: Proposing del_len option for improved speed HOT 2
- Is dumb mode (-n) currently implemented? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winafl.