Giter VIP home page Giter VIP logo

Comments (2)

alejoseb avatar alejoseb commented on July 18, 2024

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.

tneale-gt avatar tneale-gt commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.