[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8988) Undefined Behavior in slapadd
noloader@gmail.com wrote:
> On Fri, Jun 7, 2019 at 9:32 AM Howard Chu <hyc@symas.com> wrote:
>>
>> noloader@gmail.com wrote:
>> ...
>>> I encourage OpenLDAP to fix the undefined behavior. OpenLDAP is an
>>> important project, and the undefined behavior is causing too many
>>> tangential problems.
>>
>> Undefined behavior is not a bug, nor is it prohibited by the C spec. It is a necessary
>> part of the language for its intended use as a system programming language, writing
>> machine-specific programs. Anyone who says it is prohibited by the spec is wrong.
>
> I don't believe this is correct.
>
> Maybe you are thinking of implementation defined behavior?
That would apply to how a particular compiler implementation treats some piece of code.
Whether a CPU supports unaligned access is machine-defined. Since our code is already
properly ifdef'd for the machines which do or don't support it, the fact that this is
"non-portable" is not an issue.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/