As I understand it, this patch changes certain bit copying lines. Those
which cast their data as integer arrays are now cast as character arrays,
and what used to be a single copy operation is now four copy operations.
Presumably this would lead to behavior that is more robust and less likely
to fail. Can you explain under which circumstances the integer copy would
fail where the character copy would succeed? Also, can we expect smart
compilers to notice that we're copying four consecutive bytes, and use a 32
bit read/write instead of four 8 bit read/writes?

In short: it seems unlikely to me that we'd get wrong behavior on any
platform used by TCC using the current code. Thus a good explanation, and
benchmarks showing minimal (or zero) impact on execution are important for
this patch.

Thanks!
David

On Tue, Nov 17, 2015 at 6:17 PM, Edmund Grimley Evans <
[email protected]> wrote:

> Here's a patch that makes TCC pass its tests on i386 under ASan and
> UBSan without any errors or warnings. Does this seem reasonable?
> Anyone object to this approach being extended to all architectures?
>
> Edmund
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>


-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to