find memory errors quickly. (-fsanitize, addresssanitizer)

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 37

  • @Nominal_GDP
    @Nominal_GDP Рік тому +25

    Write down the stuff you want to remember, memory is volatile and you'll forget what you want so writing in a notebook is best 👍

    • @phitc4242
      @phitc4242 Рік тому +2

      I can recommend fleeting notes + obsidian or notion for those cloud freaks

  • @charliesumorok6765
    @charliesumorok6765 Рік тому +9

    With tcc, -b and -bt make the program print the names of variables and functions when a bad pointer is dereferenced or a bad pointer is created via an array access.

  • @santoshsco
    @santoshsco 7 місяців тому +1

    Just fixed a memory corruption bug after months of debugging (hard to reproduce bug)after enabling this flags mentioned in the video ,had to forcefully enable these flags in a debug build to debug at customer site . learned a lot from this channel , thank you .Always recommend this channel to my peers who work on embedded networking stuff .

  • @davidx5828
    @davidx5828 Рік тому

    I look forward to these videos. I know the good Dr doesn’t always have the time to make them but they are much appreciated.

  • @berk473
    @berk473 Рік тому +4

    Yess, please more on shadow memory👍

  • @thejedijohn
    @thejedijohn Рік тому +2

    Yes, please do one on shadow memory. Also, i know itd make the videos longer, but for videos like this i think itd ve really helpful if you gave even a brief synopsis of other options for flags like -fsanitize. Like, what else can be used other than address and what do those options do.
    I know i coukd look it up, but you explain things so well that a quick synopsis woukd be an excellent starting point.

  • @alexevier
    @alexevier Рік тому +1

    thank you for this!
    i found atleast 3 overflows in my code and im fixing it

  • @gerdsfargen6687
    @gerdsfargen6687 Рік тому +3

    Sensei where have you been? Missed you and great to "C" you! 😊

  • @Shmuklidooha
    @Shmuklidooha Рік тому +7

    Nice intro, but it would be nice if you could help interpret how the debug feedback that fsanitize gives in order to trace it back to where the error occurs in the code.

    • @tk36_real
      @tk36_real Рік тому +2

      bro there is a stack trace!?

  • @capefry8323
    @capefry8323 Рік тому +2

    Random question, but Do you have a degree in Electrical engineering Computer engineering, or Computer Science? Which is best for embedded systems work?

    • @brandonbackes930
      @brandonbackes930 Рік тому

      I would recommend computer engineering. It'll be a little more practical for integrating embedded systems into other systems. Use that as a starting point then add additional courses and modules that expand on it.

    • @jasonenns5076
      @jasonenns5076 Рік тому

      I also recommend computer engineering because it gives you versatility on what you can make.

    • @splicedbread
      @splicedbread Рік тому

      Some universities are now offering Embedded Engineering Degrees directly. Computer engineering, however, is good for a dedicated hardware background for the degree and having a hardware level understanding is good to have.
      I personally dual enrolled in both Computer Engineering and Computer Software Engineering to get into embedded.

  • @cleightthejw2202
    @cleightthejw2202 Рік тому +4

    Yes, we want to see the video on 'shadow memory'! AND we want to see the video/s on encryption function/s! :)
    Thank you :)

  • @nitinmhetre7280
    @nitinmhetre7280 Рік тому

    Superb tool. Thanks for this knowledge

  • @kevin_mitchell
    @kevin_mitchell Рік тому

    This was great. I'm still using a 2009 iMac, and I can' use valgrind in the Terminal, but I can use -fsanitize=address.

    • @StandardLoop
      @StandardLoop 5 місяців тому

      You may also be able to use macos "leaks" command. "leaks --atExit -- ./${EXECUTABLE}

  • @omegahaifoleet
    @omegahaifoleet Рік тому

    Nice tutorial
    You might want to use `make -B` instead of `make clean; make`
    -B, --always-make Unconditionally make all targets.

  • @varudurock
    @varudurock 9 місяців тому

    Yes, Please make a video on shadow memory

  • @vishnusatheesh878
    @vishnusatheesh878 2 місяці тому

    Can this ASAN can find memory bugs in heap memory?

  • @Byynx
    @Byynx Рік тому

    You should create a playlist for these c++ videos.

  • @hossein4488
    @hossein4488 Рік тому +1

    Hi Jacob, can you make a video of Heaptrack. It is a very useful memory management tool. The point is that you can attach it to the process at runtime and no need to compile. And a great GUI for analysing memory.

  • @wabdyli
    @wabdyli Рік тому

    hello
    I use valgrind on linux, but a friend is coding on a mac and we don’t know how to use valgrind there. What would be the best replacement please?

  • @sritharan20
    @sritharan20 Рік тому

    where can i get T-shirts like the one you were ? Looks awesome

  • @cupofkoa
    @cupofkoa Рік тому

    Yes please can we have a video on shadow memory.

  • @alincj21
    @alincj21 Рік тому

    Hi, there is also -fsanitize=thread, just in case.

  • @Bogulus
    @Bogulus Рік тому +1

    Very good video

  • @mynameisjeff9124
    @mynameisjeff9124 Рік тому

    Does this detect vtable overrides? If not, what does?

    • @redabou9al562
      @redabou9al562 Рік тому

      memory issues it have other option like thread sanitizer check data race..

  • @zxuiji
    @zxuiji Рік тому

    DId you see my recent comment on C89 templates that I made on your "Don't write clever code" vid? Just checking since I know sometimes comments get unnoticed due to a variety of things such as life itself.

  • @DenisTruong
    @DenisTruong 8 місяців тому

    awesome

  • @michaelthornes
    @michaelthornes Рік тому +1

    😎

  • @Vineeth_Shankar
    @Vineeth_Shankar Рік тому

    First 😅

  • @codedsprit
    @codedsprit Рік тому +1

    Waiting for such videos but in rust🦀