[Libreoffice] Small Question About sal_* Types

Norbert Thiebaud nthiebaud at gmail.com
Tue Aug 2 13:07:41 PDT 2011

2011/8/1 Marc-André Laverdière <marc-andre at atc.tcs.com>:
> I remember that one rocket disintegrated because of an issue of types...
> https://secure.wikimedia.org/wikipedia/en/wiki/Ariane_5_Flight_501
> Thankfully, LO shouldn't be used in this way... but mismatching of types
> (especially between modules) can be a source of a gazillion bugs and a
> few security issues. I guess that is the reason why POSIX and Windows
> APIs have created all sorts of types like HANDLE and size_t :)

That has been standardized more than 10 years ago in C99 with stdint.h, i.e with
[u]int_{8,16,32,64}_t and the like.
granted the project pre-date that standardization, so it did not use
it back then... but that does not mean we should
ignore standard ever-after....

on the other hand forcing a compiler to use a given size when all you
care is 'at least that size' is not a good thing. Sure performance
wise that is probably not on top of the list... but still...

> I am inclined to think that we should follow suit and standardize on the
> sal_* types, and not just on the boundaries.

There is merit to have a way to highlight ABI-breaking boundaries...


More information about the LibreOffice mailing list