Patching WebAssembly Binary with C++

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • References:
    - Deployed Game: tsoding.org/jai...
    - Source Code of the Game: github.com/tso...
    - Source Code of wasm64232: github.com/tso...

ความคิดเห็น • 41

  • @johnmcway6120
    @johnmcway6120 2 ปีที่แล้ว +70

    If gay propaganda is forbidden in Russia how are you able to openly code in c++?

    • @cyanmargh
      @cyanmargh 2 ปีที่แล้ว +4

      Ещё больше вопросов вызывает, что на жс он тоже пишет.

    • @skeleton_craftGaming
      @skeleton_craftGaming ปีที่แล้ว

      Yes, coding and c++ is so gay c# is so much better

    • @EyeNeo
      @EyeNeo ปีที่แล้ว +6

      @@skeleton_craftGaming High level noobs

    • @AndrieMC
      @AndrieMC 6 หลายเดือนก่อน

      ​@@EyeNeo bro low level devs dont make a cent, its donations, and they only do it because they want to

  • @lucifer-5ybtn
    @lucifer-5ybtn 2 ปีที่แล้ว +22

    Finally Tsoding is back after 10 days 🔥🔥🔥

    • @atharvakale343
      @atharvakale343 2 ปีที่แล้ว +1

      Have you ever been to Twitch?

  • @egoat-xyz
    @egoat-xyz 2 ปีที่แล้ว +24

    Mr Tsoding, your code is just on another level. Great concepts, a lot to learn! We do appreciate your work. Congrats from Bulgaria

  • @darioabbece3948
    @darioabbece3948 2 ปีที่แล้ว +6

    One hour intro and some copy-paste. The true c++ experience

  • @AntonioNoack
    @AntonioNoack 2 ปีที่แล้ว +13

    @46:51 for comparing text files, you could use "git diff file1.txt file2.txt" :)
    It doesn't need a git directory to work.

    • @Bobbias
      @Bobbias 2 ปีที่แล้ว

      Doesn't git just call out to whatever your default diff tool is anyway? If that's the case, you might as well just run it directly.

    • @AntonioNoack
      @AntonioNoack 2 ปีที่แล้ว

      @@Bobbias Not for me on Windows with "git diff". There might be a command to show it though. (or I can't find it in the default help page of git diff)

  • @NoOne-ev3jn
    @NoOne-ev3jn 2 ปีที่แล้ว +4

    I’m not a wasm programmer nor a C++ one but I really enjoyed and learned many things from this watch ❤️

  • @desertfish74
    @desertfish74 2 ปีที่แล้ว +3

    How about that!
    Keep up the nice videos. I enjoy watching them.

  • @musdevfrog
    @musdevfrog 2 ปีที่แล้ว +3

    My man literally named it Leaked IP.

  • @Je3f0o
    @Je3f0o ปีที่แล้ว +1

    OMG... Why is "src/..." prefix in `#include "src/*.h"` headers? omg... really great build system xD 01:15:12

  • @gr3yknigh1
    @gr3yknigh1 2 ปีที่แล้ว +2

    Always waiting ur vids. Love u

  • @dorbie
    @dorbie 2 ปีที่แล้ว +4

    I don’t think you can guarantee no address space collisions just because you aren’t exceeding 4GB. That would depend on all sorts of starting addresses and load addresses for various uses of memory. If anything in a 64bit build sets the high bits before heap growth then the lower 32 bits might very well overlap with the assumption that it’s safe. The only thing that would save you is luck and running a small program, and by small I don’t mean

    • @Diamonddrake
      @Diamonddrake 2 ปีที่แล้ว +1

      It’s not guaranteed but the added functions could guard and assert if a pointer was too big showing how likely the issue is with a memory stress test

    • @dorbie
      @dorbie 2 ปีที่แล้ว +1

      @@Diamonddrake the reason for lopping off the high bits is to remap large addresses to small. This is not about being too big, it’s about zeroing of the MSBs leading to overlapping address spaces in the remaining 32 bits. The point of 64bit is to give lots of virtual address space headroom between heap, stack, loaded binaries other data and even device mapped memory. Nothing in that mess guarantees that the 32bit LSB of any of the above won’t overlap and cause nasty unpredictable bugs. I did a quick Google search and there are some flags that seemed relevant but that was a different dev environment entirely.

    • @TsodingDaily
      @TsodingDaily  2 ปีที่แล้ว +3

      @@dorbie Where is the loaded binary located within the WebAssembly Memory?

    • @dorbie
      @dorbie 2 ปีที่แล้ว

      @@Diamonddrake P.S. running with your idea differing MSB with matching LSB could be detected but that seems like it would take additional storage and be dog slow. Some kind of page map of 32 bit addressable memory reserved with the first truncated MSB to access. So at least you'd detect disaster if a subsequent read or write used a different MSB. But this is really not a healthy scenario.

    • @dorbie
      @dorbie 2 ปีที่แล้ว +1

      @@TsodingDaily 😳 Point taken. I'm not clear on what populates the virgin address space of an executing WASM context and was talking in generalities but with some significant gaps in my knowledge.

  • @roberthickman4092
    @roberthickman4092 2 ปีที่แล้ว +1

    Really cool approach to fixing the issue, hope I get the opportunity to try Jai before too long. You tend to pronounce 'b' as 'ы', and you sound really unique due to it.

  • @angelcaru
    @angelcaru 6 หลายเดือนก่อน +1

    ewwwwwww c++

  • @Bobbias
    @Bobbias 2 ปีที่แล้ว +2

    When tsoding has a 1 hour into, you know it's gonna be good.

  • @mkrichey1
    @mkrichey1 2 ปีที่แล้ว +2

    Great programming as always :) Very cool tool!

  • @DragonKidPlaysMC
    @DragonKidPlaysMC 2 ปีที่แล้ว +1

    Discord link please?

  • @20dareason09
    @20dareason09 ปีที่แล้ว

    He was having PTSD from OOP madness in C++. haha!

  • @Bobbias
    @Bobbias 2 ปีที่แล้ว

    I've seen the term intrusive used before but never bothered to look up what it was. Well now I know. I'm not sure if I wanted to know this or not...

  • @catboyjen
    @catboyjen 2 ปีที่แล้ว

    where can i join your discord?

  • @rogo7330
    @rogo7330 2 ปีที่แล้ว

    Is there any wasm32234?

  • @samiurias
    @samiurias ปีที่แล้ว

    the domain is down :(

  • @cemalaksoy267
    @cemalaksoy267 2 ปีที่แล้ว

    ty bro, keep going!

  • @yansbanjaranchannel59
    @yansbanjaranchannel59 2 ปีที่แล้ว

    amazing

  • @justaskaulakis8202
    @justaskaulakis8202 2 ปีที่แล้ว +1

    You could create an AI that modifies itself in Jai

  • @maltamagistro
    @maltamagistro 2 ปีที่แล้ว

    Автор из России?

    • @maltamagistro
      @maltamagistro 2 ปีที่แล้ว

      Да, акцентик слышен)))

  • @lowercasebtwalso
    @lowercasebtwalso 2 ปีที่แล้ว +5

    hack on Jakt (from the Serenity people)

    • @Bobbias
      @Bobbias 2 ปีที่แล้ว +1

      I'm glad to see there's some overlap between serenity and tsoding communities. But uh, if his Zig stream is any indication, it's probably best not to bug him to use the language unless you have a couple hundred bucks and some way to send that money to Russia :^)