Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: ptr Clear Filter

Accelerated Game of Life with CUDA / Triton

Let’s look at implementing Conway’s Game of Life using a graphics card. I want to experiment with different libraries and techniques, to see how to get the best performance. I’m going to start simple, and get increasingly complex as we dive in. The Game Of Life is a simple cellular automata, so should be really amenable to GPU acceleration. The rules are simple: Each cell in the 2d grid is either alive or dead. At each step, count the alive neighbours of the cell (including diagonals). If the c

Byte Type: Supporting Raw Data Copies in the LLVM IR

GSoC 2025 - Byte Type: Supporting Raw Data Copies in the LLVM IR By Pedro Lobo #GSoC , #clang , #optimizations , #IR 22 minute read This summer I participated in GSoC under the LLVM Compiler Infrastructure. The goal of the project was to add a new byte type to the LLVM IR, capable of representing raw memory values. This new addition enables the native implementation of memory-related intrinsics in the IR, including memcpy , memmove and memcmp , fixes existing unsound transformations and en

Topics: byte i8 load ptr type

Shared_ptr<T>: the (not always) atomic reference counted smart pointer (2019)

shared_ptr<T>: the (not always) atomic reference counted smart pointer Introduction This is a write-up of the “behavioral analysis” of shared_ptr<T> reference count in GNU’s libstdc++. This smart pointer is used to share references to the same underlaying pointer. The mechanism beneath works by tracking the amount of references through a reference count so the pointer gets freed only after the last reference is destructed. It is usually used in multi-threaded programs (in conjunction with oth

Topics: atomic mov ptr rax rbp

Generic Containers in C: Vec

Generic Containers in C: vec Martin Uecker, 2025-07-20 I discuss the implementation of type and bounds safe generic containers in C. Previously, I discussed a span type, and bounds checking using arrays. Here, I will discuss a vector type. A vector type is essentially a resizable array. A vector type could be used as in the following example. int main() { vec(int) *vec_ptr = calloc(1, sizeof *vec_ptr); if (!vec_ptr) // memory out abort(); for (int i = 0; i < 10; i++) vec_push(int, &vec

Go allocation probe

Published 2025-07-18 The profiling tools in go will tell you where allocations happened in the code, but won't record the type of the allocation. I suspected that in the code I was looking at, some specific types were causing a lot of allocation but that those allocations were spread over many locations. So with the help of Matt Knight I wrote perhaps the most appallingly fragile code I have ever written - go_allocation_probe. Every heap allocation in go afaict goes through a single function -

Go Allocation Probe

Published 2025-07-18 The profiling tools in go will tell you where allocations happened in the code, but won't record the type of the allocation. I suspected that in the code I was looking at, some specific types were causing a lot of allocation but that those allocations were spread over many locations. So with the help of Matt Knight I wrote perhaps the most appallingly fragile code I have ever written - go_allocation_probe. Every heap allocation in go afaict goes through a single function -

New Android TapTrap attack fools users with invisible UI trick

A novel tapjacking technique can exploit user interface animations to bypass Android's permission system and allow access to sensitive data or trick users into performing destructive actions, such as wiping the device. Unlike traditional, overlay-based tapjacking, TapTrap attacks work even with zero-permission apps to launch a harmless transparent activity on top of a malicious one, a behavior that remains unmitigated in Android 15 and 16. TapTrap was developed by a team of security researcher