<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mathieu </title>
    <description>The latest articles on DEV Community by Mathieu  (@mathos6).</description>
    <link>https://dev.to/mathos6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3954859%2Ff1915237-aac5-4f80-aac3-ca540e034ca8.jpg</url>
      <title>DEV Community: Mathieu </title>
      <link>https://dev.to/mathos6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mathos6"/>
    <language>en</language>
    <item>
      <title>First face-to-face with Undefined Behavior in C++</title>
      <dc:creator>Mathieu </dc:creator>
      <pubDate>Wed, 08 Jul 2026 23:25:43 +0000</pubDate>
      <link>https://dev.to/mathos6/first-face-to-face-with-undefined-behavior-in-c-23po</link>
      <guid>https://dev.to/mathos6/first-face-to-face-with-undefined-behavior-in-c-23po</guid>
      <description>&lt;p&gt;Today I spent way too long debugging my toy compiler.&lt;/p&gt;

&lt;p&gt;The tokenizer seemed to work perfectly. GDB showed the expected tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exit
69
;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0exoan6y1l5uhq83e5ky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0exoan6y1l5uhq83e5ky.png" alt=" " width="797" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yet the generated assembly file was empty.&lt;/p&gt;

&lt;p&gt;I checked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the parser&lt;/li&gt;
&lt;li&gt;the code generator&lt;/li&gt;
&lt;li&gt;the file writing&lt;/li&gt;
&lt;li&gt;the assembler&lt;/li&gt;
&lt;li&gt;the linker&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything looked fine. The culprit?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;size_t m_ind;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I had forgotten to initialize it. It should have been:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;size_t m_ind = 0;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or initialized in the constructor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmzkl0j6xssjmzh9pu09u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmzkl0j6xssjmzh9pu09u.png" alt=" " width="800" height="889"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The funny part is that &lt;code&gt;tokenize()&lt;/code&gt; &lt;em&gt;appeared&lt;/em&gt; to work. That's the trap with undefined behavior in C++.&lt;/p&gt;

&lt;p&gt;An uninitialized variable doesn't always crash your program. Sometimes it "works" just long enough to convince you the bug is somewhere else.&lt;/p&gt;

&lt;p&gt;Today's reminder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you're seeing impossible behavior, suspect undefined behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DO Initialize&lt;/strong&gt; your member variables.&lt;/li&gt;
&lt;li&gt;Never trust code just because it worked once.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>First personal project: Quartzine</title>
      <dc:creator>Mathieu </dc:creator>
      <pubDate>Wed, 27 May 2026 19:48:31 +0000</pubDate>
      <link>https://dev.to/mathos6/first-personal-project-quartzine-552m</link>
      <guid>https://dev.to/mathos6/first-personal-project-quartzine-552m</guid>
      <description>&lt;p&gt;Just recently, I started a new project alongside my studies. Here at school, we plug USB drives in and out all the time and... there's a little virus going around.&lt;/p&gt;

&lt;p&gt;So I came up with a simple idea: sandbox the USB drive and only retrieve the files you actually want from it.&lt;/p&gt;

&lt;p&gt;That's how I started coding Quartzine, a sandbox for USB drives. You plug in the USB drive, Quartzine detects it, creates a virtual machine, passes the USB through to the VM, you do your stuff and... that's all I originally had in mind.&lt;/p&gt;

&lt;p&gt;Nevertheless, since I'm not really someone who focuses on the present, I decided to go further: Integrate malware analysis into it using eBPF (through bpftrace).&lt;/p&gt;

&lt;p&gt;That led me to learning bpftrace, and I'm still doing that haha.&lt;/p&gt;

&lt;p&gt;If you want to take a look, here's where the code lives:&lt;br&gt;
&lt;a href="https://github.com/Mathos6/Quartzine" rel="noopener noreferrer"&gt;https://github.com/Mathos6/Quartzine&lt;/a&gt; (The project isn't fully functional yet, but I think it'll be by the end of the summer.)&lt;/p&gt;

&lt;p&gt;I'd love to hear what you think about it, things I could improve, things I should rethink, etc.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
      <category>showdev</category>
      <category>sideprojects</category>
    </item>
  </channel>
</rss>
