Readit News logoReadit News
veltas commented on Uninitialized garbage on ia64 can be deadly (2004)   devblogs.microsoft.com/ol... · Posted by u/HeliumHydride
andikleen2 · 10 days ago
Early x86-64 Linux had a similar problem. The x86-64 ABI uses registers for the first 6 arguments. To support variable number of arguments (like printf) requires passing the number of arguments in an extra register (RAX), so that the callee can save the registers to memory for va_arg() and friends. Doing this for every call is too expensive, so it's only done when the prototype is marked as stdarg.

Now the initial gcc implemented this saving to memory with a kind of duffs device, with a computed jump into a block of register saving instructions to only save the needed registers. There was no boundary check, so if the no argument register (RAX) was not initialized correctly it would jump randomly based on the junk, and cause very confusing bug reports.

This bit quite some software which didn't use correct prototypes, calling stdarg functions without indicating that in the prototype. On 32bit code which didn't use register arguments this wasn't a problem.

Later compiler versions switched to saving all registers unconditionally.

veltas · 10 days ago
In the SysV ABI for AMD64 the AL register is used to pass an upper bound on the number of vector registers used, is this related to what you're talking about?

Loading parent story...

Loading comment...

veltas commented on What is better: a lookup table or an enum type?   cybertec-postgresql.com/e... · Posted by u/todsacerdoti
veltas · 13 days ago
Who was child 12

Loading parent story...

Loading comment...

Loading parent story...

Loading comment...

veltas commented on Codeberg is down   status.codeberg.org/statu... · Posted by u/x3ro
veltas · 15 days ago
Good thing git is distributed!

I always like to move as much as possible into the repo itself, 'issues' etc in a TODO, build scripts, or however you want to achieve that, so you can at least carry on uninterrupted when the host is down.

veltas commented on All Sources of DirectX 12 Documentation   asawicki.info/news_1794_a... · Posted by u/ibobev
eviks · 15 days ago
> What a mess! Why is the DirectX 12 documentation so scattered across so many websites in different shapes and forms? Of course, I don't know

While you're at it, do you also not know why they break the URLs from time to time so that you can't follow old guides because they point to empty pages?

veltas · 15 days ago
Microsoft does this all the time, and it reeks of a lack of continuity or ownership internally.

Loading parent story...

Loading comment...

Loading parent story...

Loading comment...

veltas commented on All Sources of DirectX 12 Documentation   asawicki.info/news_1794_a... · Posted by u/ibobev
veltas · 15 days ago
Basically all native libraries inevitably have bad or difficult to follow documentation like this, proprietary or open source. Vulkan is the exception as it's a standard so needs to be very clear so all stakeholders can implement it correctly.

Usually I find if you're using an open source library you need the whole source checked out for reference, better than proprietary libraries where you need to pay and sign an NDA to get that access or equivalent support.

u/veltas

KarmaCake day1611November 16, 2013
About
veltas.co.uk
View Original