Programming Leftovers
-
LLVM Clang 12 Adds Support For Vectorization Using Glibc's Vector Math Library - Phoronix
Upstream LLVM/Clang now supports making use of the vector math library found within the GNU C Library.
Clang 12 will allow for vectorization using libmvec via the -fvec-lib=libmvec compiler option.
-
Notes to self on frama-c | Richard WM Jones
Frama-C is a giant modular system for writing formal proofs of C code. For months I’ve been on-and-off trying to see if we could use it to do useful proofs for any parts of the projects we write, like qemu, libvirt, libguestfs, nbdkit etc. I got side-tracked at first with this frama-c tutorial which is fine, but I got stuck trying to make the GUI work.
-
Why I Dislike Switch Statements
Of course this is a contrived example, but readers will hopefully agree it's representative of the construct.
-
Setup - Full Stack Tracing Part 2 - KDAB
If you’ve read the first article in this series, you’ll know what full stack tracing is and why you definitely want it. This time, we’ll show you how to setup full stack tracing on your Linux system. There are two steps – first get everything configured to capture a trace, and then view and interpret the trace.
Setup full stack tracing with a bit of kernel help
To capture a trace, we’ll be using LTTng (Linux tracing toolkit next generation) in our examples. LTTng captures tracepoints with minimal overhead. This is something you definitely want, as too much extra CPU introduced by tracing can change the system’s behavior, even causing it to fail unpredictably. Another factor in LTTng’s favor is that it’s well supported by the open source community.
LTTng was designed to record kernel level events. However, you’ll also want to use its user space tracepoints to capture application level events. That will give you consistent visibility, regardless of where execution moves throughout the software stack. User space tracepoints is critical to the setup of full stack tracing as it lets you integrate application, Qt, and kernel tracepoints together in a single view.
-
Mariuz's Blog: Firebird 3.0.7 sub-release is available
Firebird Project is happy to announce general availability of Firebird 3.0.7 — the latest point release in the Firebird 3.0 series.This sub-release offers many bug fixes and also adds a few improvements, please refer to the Release Notes for the full list of changes.Binary kits for Windows, Linux, Mac OS and Android platforms are immediately available for download.All users of Firebird v3.0.6 are
-
Use of self or $this in PHP – Linux Hint
In PHP object-oriented programming, we have the self keyword and $this variable that is used for different purposes. The self keyword represents current and static members of the class. While the $this variable represents current object and non-static members of the class. More about these are discussed in this article.
-
4 C programming courses for every skill level
Even with so many other system-level languages to choose from, C remains the popular choice. Many key projects—such as the Linux kernel and the Python runtime—still use C, and they will likely do so indefinitely. For some fields of computing, like embedded programming, C is a must.
And there has never been a better time to learn C. Resources abound, from books to guided courses. Here we’ll look at four major online course offerings for learning C programming, each aimed at different levels of user and offering different approaches. For instance, one combines learning C with learning Linux, while another teaches C and C++ together. -
rand() Function in C Language – Linux Hint
In the C language, the rand() function is used for Pseudo Number Generator(PRNG). The random numbers generated by the rand() function are not truly random. It is a sequence that repeats periodically, but the period is so large that we can ignore it. The rand() function works by remembering a seed value that is used to compute the next random number and the next new seed. In this article, we are going to discuss in detail how random numbers can be generated using the rand() function. So, let’s get started!
-
A bug by any other name – Open Source Security
This tweet from Jim Manico really has me thinking about why we like to consider security bugs special. There are a lot of tools on the market today to scan your github repos, containers, operating systems, web pages … pick something, for security vulnerabilities. I’ve written a very very long series about these scanners and why they’re generally terrible today but will get better, but only if we demand it. I’m now wondering why we want to consider security special. Why do we have an entire industry focused just on security bugs?
Let’s change the conversation a little bit. Rather than focus on security bugs, let’s ask the question: Which bugs in a given project should we care about?
There are of course bugs an attacker could use to compromise your system. There are also bugs that could result in data loss. Or bugs that could bring everything down. What about a bug that uses 10% more CPU? Every piece of software has bugs. All bugs are equal, but some bugs are more equal than others.
We are at a time in software history where we have decided security bugs are more equal than other bugs. This has created entire industries around scanning just for security problems. Unfortunately the end goal isn’t always to fix problems, the goal is often to find problems, so problems are found (a LOT of problems). I think this is a pretty typical case of perverse incentives. You will always find what you measure. The pendulum will swing back in time, maybe we can help it swing a little faster.
-
Why you should use ppport.h in your XS code modules | Karl Williamson [blogs.perl.org]
The answer comes down to two words: Security and Reliability. As a bonus, less work on your part. It's surprising to find that there are modules on CPAN that aren't using ppport.h that could stand to benefit from it. ppport.h is a file that is part of the Devel::PPPort distribution. As you know, Perl has evolved over the years, adding new features, and new API for XS writers to use. Some of that is to support the new features, and some to make tasks easier to accomplish. ppport.h implements portions of the API that people have found desirable to have when a module gets installed in a Perl that was released before that API element was created. You can write your module using the latest API, and have it automatically work on old Perls, simply by #including ppport.h in your XS code. ppport.h generally provides support for an API element as is reasonably practicable, with many supported to 5.03007. Importantly, but often overlooked, ppport.h can override buggy early Perl implementations of an API element. By using it, you get fixed, proper behavior. That sure beats trying to reproduce a reported problem in your module that only happens in some ancient Perl, and then try to come up with a workaround in an area you aren't familiar with. This is especially important if your XS code interacts with Unicode in any way. Early versions of the Unicode standard and early Perls allowed things that we now know are potential attack vectors. Right now, someone could be using your module to hack into systems, so you are actually being negligent if you don't use ppport.h. If your XS code has preprocessor #if statements that check for the existence of functions, macros, etc, that are only in later perls, you can generally avoid that by simply using ppport.h
- Login or register to post comments
- Printer-friendly version
- 2213 reads
- PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is releasedAfter three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. |
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future TechThe metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. |
today's howtos
|
Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago