Memory Safe C++

Поділитися
Вставка
  • Опубліковано 15 бер 2024
  • Live on Twitch: / lowlevellearning
    🏫 COURSES 🏫 Check out my new courses at lowlevel.academy
    🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at / lowlevellearning
    Why Do Header Files Exist? • why do header files ev...
    How Does Return Work? • do you know how "retur...
    🔥🔥🔥 SOCIALS 🔥🔥🔥
    Low Level Merch!: lowlevel.store/
    Follow me on Twitter: / lowleveltweets
    Join me on Discord!: / discord
  • Наука та технологія

КОМЕНТАРІ • 681

  • @LowLevelLearning
    @LowLevelLearning  3 місяці тому +825

    learn to write safe C at lowlevel.academy 🙃

    • @silloo2072
      @silloo2072 3 місяці тому +3

      Why is it unsafe?😢

    • @gulpdiator
      @gulpdiator 3 місяці тому

      @@silloo2072 For comparison, C is like America. Everyone is allowed to hold and use a gun, say they are using it safely but nobody is going to check. Result is another school shooting.

    • @notNajimi
      @notNajimi 3 місяці тому +17

      @@silloo2072I’m not a programmer but my understanding is that C does not manage memory for you, so poor memory management by the author often makes the software very vulnerable to exploitation

    • @silloo2072
      @silloo2072 3 місяці тому +4

      @@notNajimi yeah I know that but thanks for answering my question!

    • @MatthewCarven
      @MatthewCarven 3 місяці тому

      arbitrary length arithmetic with gmp

  • @valmirius
    @valmirius 3 місяці тому +6009

    Okay this is the sort of click bait I can get behind

    • @jamiepaugh9700
      @jamiepaugh9700 3 місяці тому +6

      My first thought too!

    • @toseeyourise3011
      @toseeyourise3011 3 місяці тому +3

      Ezsnippet technique

    • @networkoperations
      @networkoperations 3 місяці тому +4

      I feel like it's not even clickbait. Just a dating add for LLP

    • @susamogus11111
      @susamogus11111 3 місяці тому

      Best clickbait ever

    • @Leo-sd3jt
      @Leo-sd3jt 3 місяці тому +2

      It's not clickbait. It does what it says on the tin

  • @Movie-xz3hw
    @Movie-xz3hw 3 місяці тому +3010

    I thought it's a UA-cam glitch 😂😂

  • @samelosito
    @samelosito 3 місяці тому +1524

    I shared it with my gf because of the first part, you're reaching a new target audience with this 😂

  • @nicholasfinch4087
    @nicholasfinch4087 3 місяці тому +710

    STOP!! YOU HAVE VIOLATED MEMORY! Pay the court a fine or serve your sentence

    • @Darkness18641
      @Darkness18641 3 місяці тому +42

      Your stolen addresses are now forfeit!

    • @Clasped003
      @Clasped003 3 місяці тому +13

      After you have served your sentence. . . there's a settlement that needs your help. I'll mark it on the map.

    • @MrNeelthehulk
      @MrNeelthehulk 3 місяці тому +2

      I am calling the cops..

    • @bobmike2373
      @bobmike2373 3 місяці тому +5

      *resist arrest*

    • @sindhurtej9638
      @sindhurtej9638 2 місяці тому +6

      ​@@bobmike2373Then pay with your buffer!

  • @JonnesTT
    @JonnesTT 3 місяці тому +245

    If you date him, you'll know that once you die, your memory will be save.

    • @ralek592
      @ralek592 Місяць тому

      The d wasn't saved

  • @AzurePages
    @AzurePages 3 місяці тому +345

    As a JavaScript developer this is very helpful

    • @user-vh4mf4ux2m
      @user-vh4mf4ux2m 3 місяці тому +10

      How

    • @jongeduard
      @jongeduard 3 місяці тому +72

      The similarity between C and JS is that both languages serve you little warnings about error situations.
      The difference is that C solves this by not doing anything more than you asked (programmed) it to do, while JS makes all kinds of unexpected conclusions by coercing your values in all kinds of ways it without asking you, causing different kinds of silent failures or unexpected situations.
      What is better? A difficult to debug segmentation fault or 1 plus 1 equals 11 situation that makes no sense?

    • @Justin-fq8dt
      @Justin-fq8dt 3 місяці тому

      @@user-vh4mf4ux2mit's a joke

    • @liquidsnake6879
      @liquidsnake6879 3 місяці тому +23

      @@jongeduard Typecasting is not something exclusive to Javascript and is entirely manageable if you know what you're doing with it, a lot of people hate it and that's why Typescript and JSDoc are a thing, but it's still not as big an issue as people make it out to be

    • @gro967
      @gro967 3 місяці тому +10

      Peak trolling right here :D

  • @procyon.lotor4
    @procyon.lotor4 3 місяці тому +177

    Not only is he not cheating, he's making way more money than the guy that's cheating

    • @Fanaz10
      @Fanaz10 3 місяці тому +18

      but where's drama in that

    • @procyon.lotor4
      @procyon.lotor4 3 місяці тому +30

      @Fanaz10 that code be lookin pretty dramatic

    • @Ebani
      @Ebani 2 місяці тому +1

      ​@@Fanaz10 Are you female?

    • @Fanaz10
      @Fanaz10 2 місяці тому +5

      @@Ebani only a female would ask such question

    • @sgt92
      @sgt92 2 місяці тому +1

      A small correction…”the guy she is cheating with”

  • @TheCodeHunter
    @TheCodeHunter 3 місяці тому +39

    As a C programmer I can confirm this

  • @ninjasack9134
    @ninjasack9134 3 місяці тому +109

    I don't cheat because I don't have anyone to cheat on, or with

    • @seansingh4421
      @seansingh4421 3 місяці тому +14

      One day you will, soon perhaps 😊😊 cheers dawg

    • @ninjasack9134
      @ninjasack9134 3 місяці тому

      @@seansingh4421 it's all about the action, and if you aren't making it happen, it won't happen

    • @Quancept
      @Quancept 3 місяці тому

      ​@@seansingh4421wait...what?

    • @poppers7317
      @poppers7317 3 місяці тому +21

      I also hope you find someone to cheat on.

    • @Eddie276
      @Eddie276 2 місяці тому +7

      Good luck with your future cheating endeavours!

  • @OmegaF77
    @OmegaF77 Місяць тому +17

    HALT! YOU HAVE COMMITTED CRIMES AGAINST MALLOC AND HER PROCESSES. WHAT SAY YOU?

  • @DaGlitchMaster
    @DaGlitchMaster 2 місяці тому +42

    As someone who has used GDB and knows exactly what he was talking about and doing...
    I feel very called out by this.

  • @delta2080
    @delta2080 2 місяці тому +7

    Bro is cooking 🔥

  • @aryomuhammad8254
    @aryomuhammad8254 3 місяці тому +41

    Memory safe C++ 👍

  • @iandillard9614
    @iandillard9614 2 місяці тому +54

    To answer the question again, I’m just chilling in my garage listening to music thinking I could probably afford a new tool box in a month or two. Also I gotta wash the dogs (she asked if I could wash the dogs). I really don’t like washing the dogs…. So I’m gunna measure this one spot where I think this new tool box could go again (I know it will fit there’s nothing there) then I’ll wash the dogs.

    • @sidequestsally
      @sidequestsally 2 місяці тому +2

      Simple man, simple life :)

    • @nathanrice6589
      @nathanrice6589 2 місяці тому +3

      Pfffftttt…. Hahaha!…. I’m starting to get the feeling this guy wants a tool box?….hmmm?

  • @kaatlev
    @kaatlev 3 місяці тому +10

    I love the beginnings to these videos now, i never used to interact but i did watch them, hilarious..love it.

  • @kuhluhOG
    @kuhluhOG 3 місяці тому +111

    So, from the code I can see in this short, this is the function:
    void handleClient(int cfd) {
    std::cout

    • @abbasbvohra
      @abbasbvohra 3 місяці тому +14

      nice example && yes you are completely right dude.

    • @0xXKARLOSXx0
      @0xXKARLOSXx0 3 місяці тому

      you're useless

    • @12MrRetro
      @12MrRetro 3 місяці тому +12

      Some ppl would still say “If you follow 100500 rules of best f practices, c++ can be safe as rust”

    • @abbasbvohra
      @abbasbvohra 3 місяці тому

      @@12MrRetro yes that is quite true, but that is why rust is growing currently because it forces the developer to follow best practices. but seriously & realistically speaking, C/C++ originated at a time when programming was still done by a very few people, nowadays in the age of ultron (i mean chatgpt) every tom dick & harry wanna build the top revernue earning application using a few well stated prompts (which ain''t programming but the final output makes one think other wise) so in comparision when rust still is in infancy such programming paradigms in which the compiler & language requires following of best practices is quite natural & expected. And with the complexity of today's software it is a good thing that languages like rust are being used over languages like c/c++ (note i prefer c/cpp over every other language but that does not mean i enjoy myself shooting myown foot (except when i am feeling like it : -) ).

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

      Did he compile it with the symbols intact?

  • @ali_randomNumberHere
    @ali_randomNumberHere 3 місяці тому +31

    That's literally how we write cheats 😅

  • @yukisnoww
    @yukisnoww 3 місяці тому +7

    I swear this guy has the best bait intros HAHAHA

  • @waffleswafflson3076
    @waffleswafflson3076 3 місяці тому +3

    I love this format.

  • @ronsijm
    @ronsijm 3 місяці тому +3

    This kinda sounds close to Cheat Engine stuff though (the memory editor)

  • @podunkest
    @podunkest Місяць тому +30

    If you spend most of your time talking about, thinking about and/or worrying about other people and your or their sex lives, maybe consider a hobby.

    • @poleve5409
      @poleve5409 Місяць тому +3

      says the mf who spends 10 hours a day on yt shorts

    • @legroom4575
      @legroom4575 Місяць тому

      Spectacularly missing the point of her trying to find a man who doesn't cheat because male cheating is so common

  • @sandtrick
    @sandtrick Місяць тому

    I love how you make a joke out of this. Laughing and learning

  • @kademeyer9993
    @kademeyer9993 2 місяці тому +1

    “wyd” homie im having a fruitful marriage

  • @khasanshadiyarov
    @khasanshadiyarov 3 місяці тому +2

    You can violate memory, but never the family

  • @marvellousruni8475
    @marvellousruni8475 3 місяці тому +1

    Damn i love this channel 😂😂

  • @Teh_Random_Canadian
    @Teh_Random_Canadian 3 місяці тому +3

    That was funny. Subbed

  • @Dylan_thebrand_slayer_Mulveiny
    @Dylan_thebrand_slayer_Mulveiny Місяць тому +3

    Best tip to write memory safe code? Don't use c.

  • @StevenCroghan
    @StevenCroghan 3 місяці тому

    Keep these coming these have been cracking me up 😂

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

    The information is phenomenal

  • @virno69420
    @virno69420 3 місяці тому +35

    0 educational value to this, you didn't explain anything?

    • @CPSPD
      @CPSPD 3 місяці тому +9

      Yea absolute waste of time.

    • @user-ed1nw6vr8n
      @user-ed1nw6vr8n 3 місяці тому +6

      yeah, i also am wondering when he just show addresses and don't fully explain

    • @schlopping
      @schlopping 3 місяці тому +4

      Are you dense?

    • @Edg30fd3w0r1d
      @Edg30fd3w0r1d 3 місяці тому +9

      I guess you missed the joke

    • @deleater
      @deleater 3 місяці тому +4

      @@Edg30fd3w0r1d Exactly! The whole video is sarcasm. There is no such thing as "Memory Safe C++".

  • @Xyrer
    @Xyrer Місяць тому +3

    "Private" var is not really private in C lol

  • @NoHandle684
    @NoHandle684 Місяць тому +2

    Good men are always out there, women just always think the beast (assholes) will turn into the prince that will save the princess.
    Sadly our society thinks it’s cool to be a douche, but nobody learns to be decent.

  • @sethgaston8347
    @sethgaston8347 Місяць тому

    Thanks I’ll remember that! C has been like decrypting an ancient wizard tome for me; and just as fun!

  • @PabloSanchez-gi8hd
    @PabloSanchez-gi8hd 3 місяці тому +64

    Thats low level hacker stuff 🏴‍☠️

  • @___jd
    @___jd 2 місяці тому +1

    The joke is funny, but as a programmer of 20 years I promise you this is such a stupid way to live life. I may be jaded, but I’ve always felt like I was wasting so much of my time with dependency versioning, and querying optimization, and “ohh how do I chunk this array to do batch processing” like who gives af I want to be laying in a field eating peaches, that’s it

  • @user-uz1lr3uy7x
    @user-uz1lr3uy7x 2 місяці тому

    I'm in awe of your talent.

  • @FutureWiredTec
    @FutureWiredTec 3 місяці тому +25

    This guy is a legend

  • @igormicovic
    @igormicovic 3 місяці тому +1

    Can I get link to full video please, really need this..

  • @rougeyuki
    @rougeyuki 2 місяці тому +1

    Once you see Nick from The Yard podcast you cannot unsee..

  • @MaxPower-ek7gi
    @MaxPower-ek7gi 3 місяці тому

    man, I don't even care a lot about coding, but the transitions are pure gold

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

    Getting rdy to sitdown in my pjs for work and this just made me lol 😂

  • @LethinGabbins
    @LethinGabbins Місяць тому

    That was the best stitch ever.

  • @alexanderd.7818
    @alexanderd.7818 3 місяці тому +2

    No this doesn’t mean that you can exploit the program because no real world application will be published without using the hardening flags to compile it.

  • @GhostRevenge36
    @GhostRevenge36 Місяць тому

    Aaaaand now I'm subscribed. 😄 Trying to learn code. Definitely wanting to learn from someone with a great sense of humor!

  • @TheMadStu
    @TheMadStu 3 місяці тому

    Finally, my recommendations have reached my people

  • @JimMaz
    @JimMaz 28 днів тому

    ❌ Violating girlfriend's trust
    ✅ Violating memory safety
    ❌ Has girlfriend

  • @bestinfinity1
    @bestinfinity1 3 місяці тому +1

    Been writing safe c for a while and can confirm i never cheat

  • @Kane0123
    @Kane0123 3 місяці тому

    Lovin the intros

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

    3am: where were you?
    Me: banging out a ROP chain, smashing stack protections. Receipts and PoC to prove it

  • @brianlogan4740
    @brianlogan4740 Місяць тому

    Man I really want to get into routinely learning more of this stuff.
    Do you guys have a Discord?

  • @sierragutenberg
    @sierragutenberg 3 місяці тому +2

    I thought I clicked on the wrong video lol

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

    Theres two types of dudes who dont cheat, hard workers, and nerds. The dude majoring in business promising hell be a millionaire in a year is the dude whos gonna cheat

  • @-average
    @-average 3 місяці тому

    my brain instantly switched to understanding even though i don't know C at all

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

    This is so fuckin true

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

    I build with Lego and make cars with realistic suspension and pumping engines. Sometimes I our motors and Bluetooth hubs in there to make them like RC cars that I built out of Lego. It’s so fun.

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

    I thought UA-cam bugged out for a second, it took re watching to realize it was a meme lol

  • @user-eo5eb9re9l
    @user-eo5eb9re9l 3 місяці тому

    You did a great job.

  • @WillLivingston2023
    @WillLivingston2023 3 місяці тому +1

    In the bay area that guy doesn’t cheat but he is in a polyamorous relationship.

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

    I have been accused of cheating in every single relationship I have ever been in, I have never once done it. I gave up on all relationships 11 years ago. And now all I do is work and enjoy my peace.

  • @lambmaster
    @lambmaster 2 місяці тому +1

    Accept it, ladies. Embrace it. Embrace your programmers.

  • @ThishsitwontgetmynameFoFF
    @ThishsitwontgetmynameFoFF Місяць тому

    Bro named violation of memory safety http😭

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

    Reminds me of the Apple II Monitor. There WAS no memory protection

  • @zark169
    @zark169 Місяць тому

    That is an accurate response. If your man is spending his free time coding, he's not the type to cheat.

  • @funnyduck6326
    @funnyduck6326 3 місяці тому +1

    Love that videos :D Really what we need, not relationships and shitty songs, only CODING

  • @ttvbrxkens0ul
    @ttvbrxkens0ul 4 години тому

    Me personally, I’m too busy trying to reach a 4 digit rank on osu! while she gives me encouraging words of support 😂❤

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

    He’s making 6 figures building the world up. Do you bro and hold the lines.

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

    Secret meaning behind David Guetta's song was really about .. "all the crazy code I did tonight .. those will be the best memories .."

  • @russianvideovlogguy
    @russianvideovlogguy 3 місяці тому +2

    "we literally like are like a low level programmer like watch me literally look at machine code, like im so like low level, like im literally so smart"

    • @Rob-rg6kr
      @Rob-rg6kr 2 місяці тому +2

      Yea normal people talk like him, don't be a pretentious antisocial programmer stereotype..

  • @koolerpure
    @koolerpure Місяць тому

    lol ain’t wrong except this time I’m painting my car rims

  • @belly233
    @belly233 3 місяці тому +1

    Hilarious start of the vid 😂

  • @codexofkrypton6961
    @codexofkrypton6961 Місяць тому

    Can’t lie I like this bait and switch 😅 I’m entertained 👍🏾

  • @brianwood1536
    @brianwood1536 Місяць тому

    Accurate.

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

    “Men who don’t cheat wyd”
    Sitting at home happily w my girl

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

    Omg this is perfect

  • @keyednation
    @keyednation 16 днів тому

    I need to learn about these things

  • @Ghostdawg176
    @Ghostdawg176 18 днів тому

    And when she asks me what I’m coding the answer always leaves her in a state of 👁️👄👁️

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

    The short answer is being productive.

  • @WiseWeeabo
    @WiseWeeabo 8 днів тому

    How to write memory safe C:
    1. Start a new Rust project

  • @fr89k
    @fr89k Місяць тому +1

    I see that this is a weird C and C++ mix. However, I really can't see the problem with the code with regard to memory management. Given the comments, it probably makes me look stupid to admit it, but I really don't see the problem regarding memory safety. Sure, it will print some garbage, as the string isn't properly "right-sized" but there should be no invalid memory access. It should all be contained to the memory of the array.

    • @joelstienlet1641
      @joelstienlet1641 День тому

      I agree, I don't see memory violations stricto sensu. But the garbage it will print out will be the contents of the stack, maybe leaking some sensitive information (like cryptographic keys or whatever).

    • @fr89k
      @fr89k День тому +1

      @@joelstienlet1641 Maybe. However, I dislike that the guy makes it sound as if it was a C++ problem. You can do the same mistake with C. Actually, if C++ was used properly here, instead of mixing C and C++, the likelihood for this mistakes would also be way lower.

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

    As a CSS3 expert this is very useful

  • @padronic
    @padronic 28 днів тому

    Damn, I know what he's talking about.. i need to tough grass

  • @petephelp971
    @petephelp971 3 місяці тому +6

    I'm going to start learning code now. Put it off for long enough I got my CCNA, RHCSA, now it's time take on coding.

  • @ScottyG-wood
    @ScottyG-wood Місяць тому

    😂😂😂 legitimate take on this.

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

    living a good life, avoiding degeneracy.

  • @ProdBySneezy
    @ProdBySneezy 2 місяці тому +1

    As a long time C++ dev, the problem is… you do not know how to write memory safe C++

    • @chri-k
      @chri-k 2 місяці тому

      the point of the video was the joke a the start.
      I'm pretty sure the rest is out of context

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

    i love all ur vids

  • @anuradhaamarasinghe9649
    @anuradhaamarasinghe9649 2 місяці тому +1

    Dumb question: how do you know those are stack addresses ?

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

    effs are memory addresses. Memory safe c++. I learned something today.

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

    Got a nerd husband myself. I just have to feign interest in anything nerdy and I’m golden.😂

  • @iron_spark
    @iron_spark 3 місяці тому

    i love this

  • @zelven6109
    @zelven6109 3 місяці тому

    Hey! Can you one day do a tour of your operating system?

  • @gormenfreeman499
    @gormenfreeman499 3 місяці тому

    Dating has become monopolized by a subset of hyper attractive men and many women are still too lame to figure it out yet. These men in the past would face barriers before to stop their monopoly but feminism tore that fence down.

  • @cjur1
    @cjur1 Місяць тому

    I love this but don't understand yet

  • @ManKidCS
    @ManKidCS Місяць тому

    Law & Order Special Victims Unit Season 93 Episode 7: Memory Fault.

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

    busy feeling unwanted

  • @hit7090
    @hit7090 3 місяці тому +1

    I don’t think this is possible in new versions😅. You can’t exploit memory that easily since we have randomization😅😅

  • @TheSnowWolf1000
    @TheSnowWolf1000 Місяць тому +1

    my dirtbikes and truck take all my money so i stay home and eat chicken at night.

  • @adrianmh
    @adrianmh 3 місяці тому

    Fing hilarious 😂

  • @dijik123
    @dijik123 28 днів тому

    Omg man made me laugh hard