Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:47 UTC Jan Schaumann Jan Schaumann
    in reply to

    Advanced #Programming in the #UNIX Environment

    sizeof != strlen

    Now that we know how to use gdb(1), we use it to help us understand a common mistake made when programming in C: misunderstanding the unary 'sizeof' operator, which returns the _storage size of an expression or a data type_, not the length of a string or size of a dynamic buffer.

    (This ultimately lead me to write the 'sizeof' manual page now included in #FreeBSD: https://man.freebsd.org/cgi/man.cgi?query=sizeof&apropos=0&sektion=0&manpath=FreeBSD+14.1-RELEASE+and+Ports&arch=default&format=html )

    https://youtu.be/FyPqII2rewA

    #apue

    In conversation about 6 months ago from mstdn.social permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      sizeof
    2. Advanced Programming in the UNIX Environment: Tool Tip: sizeof != strlen
      from cs631apue
      In this video, we explain how the "sizeof" operator differs fundamentally from the "strlen(3)" library function and why it is important to not confuse the tw...
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:48 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 5, Unix Development Tools: gdb(1), part IV

      We're (finally) wrapping up this week's materials by using the debugger to examine memory locations in a running program and illustrating how pointers and arrays work in the C programming language. We also learn that a buffer overflow does not _necessarily_ lead to a segfault.

      https://youtu.be/hr-rn0yUhAw

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:49 UTC Jan Schaumann Jan Schaumann

      Advanced #Programming in the #UNIX Environment

      Week 5, Unix Development Tools: gdb(1), part III

      We use our newly learned debugging skills to analyze and fix yet another flawed program. In the process, we learn to debug code from multiple source files and find out how to change the value of variables while the program is running.

      https://youtu.be/hgcj7iAxhhU

      #apue

      In conversation about 6 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.