Comments (2)
You can change the code to increase the counter every time the get tick function is called. That is a hack but probably enough for testing the rest of the code.
from p2im.
OK, I modified ~/.arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/wiring.c so that references to GetTickCount() are replaced by a function returning a number that increments each time it is called. The emulation no longer stalls in delay(), but it still stalls. The problem seems to be caused by an infinite loop in the function UDD_InitEP()
0x82270 <UDD_InitEP+32> lsls r3, r3, #13
0x82272 <UDD_InitEP+34> bmi.n 0x82276 <UDD_InitEP+38>
>0x82274 <UDD_InitEP+36> b.n 0x82274 <UDD_InitEP+36>
0x82276 <UDD_InitEP+38> bx lr
0x82278 <UDD_InitEP+40> andmi r12, r10, r0
----------------------------------------------------------------------------------
(gdb) stepi
0x00082274 in UDD_InitEP ()
0x00082274 in UDD_InitEP ()
0x00082274 in UDD_InitEP ()
(gdb) bt
#0 0x00082274 in UDD_InitEP ()
#1 0x00081a3c in USB_ISR () at /root/.arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/USB/USBCore.cpp:614
#2 0x00080dae in UOTGHS_Handler ()
#3 0xfffffff8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
I avoided that by modifying
~/.arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/USB/USBCore.cpp
to make the USB_ISR() function always return without doing anything. Now I can proceed to run the fuzzer.
Is that an expected modification, or is there a better alternative (or am I doing something wrong?). Thanks for your help.
from p2im.
Related Issues (20)
- How to get the qemu log information, when afl is running. HOT 1
- me.py error "Stage 1 returned due to unexpected reasons!" HOT 7
- KeyError:255, QEMU's return value is not found HOT 2
- Encounter a problem: get qemu log when fuzzing and then can not find crash anymore HOT 2
- Qemu hangs when running unit test
- What is the "aup" mean? HOT 1
- Generated model can fail validation when loaded HOT 1
- When using cov.py, should I copy my firmware?
- Memory limit HOT 5
- OSError: [Errno 8] Exec format error
- Need some help on 'Analyzing crashing'
- Docker Build Script Failed To Fetch HOT 5
- Where to locate peri-mod/peri-mod.h HOT 1
- Cannot find the repo HOT 1
- Crash Analysis HOT 1
- How to compile using ARMCC HOT 4
- Can p2im only be used to test devices with source code? HOT 1
- Dose p2im support the firmware that uses the SD card? HOT 1
- QEMU image librt: undefined symbol: __clock_nanosleep HOT 3
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 p2im.