I’m still a newfag and already I’ve gotten over 9000 SEGVs with C from accidentally passing uninitialized pointers to functions

Follow

@mikuphile How? Never felt like a problem since you generally only get pointers from addressing stack vars or mallocs :tanya_thinking:

· · Web · 1 · 0 · 0

@applejack Usually just being a retard and placing functions that expect a valid pointer (like asoundlib’s snd_pcm_type()) before initializing the pointer (after snd_pcm_t *handle; but before err = snd_pcm_open(&handle, "hw:CARD", SND_PCM_STREAM_PLAYBACK, 0);)

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.