Get the latest tech news

Someone's been messing with Python's floating point subnormals


TL;DR: After noticing an annoying warning, I went on an absurd yak shave, and discovered that because of a tiny handful of Python packages b...

This is even more brittle than the disassembly-based technique, but since none of the instructions involved use any memory addresses (which would change depending on exactly where crtfastmath was linked into the binary), the sequence is pretty consistent over the range of compilers I could check (gcc-{5,7,8,9,11} and clang-{10,11,12,14}). The only difference I saw is that newer compilers start the function with endbr64 (an instruction that tells Intel's Control-flow Enforcement Technology, an exploit mitigation technique, that this is a valid jump target). Thanks to Ben Gras, Peter Goodman, and David R. MacIver on Twitter for helping me rephrase the caption so that it was fully justified to the width of that box in the top-left.Longer-term, gcc and clang should provide more sane defaults.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Related news:

News photo

GIL Become Optional in Python 3.13

News photo

Writing a tile server in Python

News photo

Show HN: Visual A* pathfinding and maze generation in Python