The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,156 other followers

Archive for the ‘C’ Category

LD_PRELOAD: preload a Linux library, for instance to obtain more information on a segmentation fault

Posted by jpluimers on 2020/06/11

Not being a proficient Linux programmer, I wondered what other means than learning gdb intrinsics I had to get more information about a segmentation fault.

A while back, pip list 2> /dev/null would cause a segmentation fault on my system (see [WayBack] Bug 1084812 – [aarch64] IPv4 DNS leading to segfaults).

It turns out that LD_PRELOAD was my friend (like TERM=xterm was a friend before): pip list 2> /dev/null

It indicated that the problem was in libc, which on opensuse is implemented by glibc.

This meant that the originally diagnosed problem was already accurately describing the symptoms.

Searching for glibc didn’t reveal many useful links, so I’ve included the one making most sense to me here:

The cool thing: most of the links above come from [WayBack] segmentation fault – Can you get any program in Linux to print a stack trace if it segfaults? – Server Fault which I found when searching for linux find segmentation fault stack trace

That link explains both the LD_PRELOAD steps and gdb steps (:

An alternative is to use gdb directly: [WayBack] command line arguments – How do I run a program with commandline args using gdb within a bash script? – Stack Overflow:

gdb -ex=run --args pip list


Posted in *nix, C, Development, gcc, Linux, Power User, Software Development | Leave a Comment »

Why Is SQLite Coded In C

Posted by jpluimers on 2020/06/04

Old, but still an interesting read: [WayBack] Why Is SQLite Coded In C and [WayBack] Appropriate Uses For SQLite.

TL;DR: SQLite – mainly competing with fopen has few dependencies and uses C in a boring way. I think that’s good.

Via: [WayBack] Why Is SQLite Coded In C – ThisIsWhyICode – Google+


Posted in C, Database Development, Development, Software Development, SQLite | Leave a Comment »

The Invention of C++ – Nice bit of net lore

Posted by jpluimers on 2020/04/30

This is a nice joke: [WayBackThe Invention of C++ – Nice bit of net lore.

But the actual interview linked from the article is quite nice: [WayBack: The Real Stroustrup Interview]

By the name, I found the actual (hopefully still online when this gets out of the blog post queue) version at [WayBack] Stroustrup: Interviews under [


Via: [WayBack] The invention of C++ – Thomas Mueller (dummzeuch) – Google+

Posted in C, C++, Development, History, Software Development | Leave a Comment »

Flexible and Economical UTF-8 Decoder

Posted by jpluimers on 2019/12/25

For my link archive: [] Flexible and Economical UTF-8 Decoder.

Be sure to read the whole article there as the explanation of the initial algorithm is important and final algorithm is towards the end.

The foundation is a state machine combined with a lookup table to find the initial state and proceed to subsequent states.

Related (and reminder to check what David did):


Read the rest of this entry »

Posted in C, C++, Delphi, Development, Software Development | 1 Comment »

Teach Yourself C++ in 21 days…

Posted by jpluimers on 2019/10/10

[WayBackAbtruse Goose: Teach Yourself C++ in 21 days…

Via: [WayBack] “How to learn programming in 21 Days” – CodeProject – Google+

Read the rest of this entry »

Posted in C, C++, Development, Fun, Software Development | Leave a Comment »

%d bloggers like this: