All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
@ 2014-12-23 23:17 Peter Maydell
  2015-02-05 17:03 ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2014-12-23 23:17 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Paolo Bonzini, Michael Roth, Luiz Capitulino

If you do a clang build with -fsanitize=undefined, then you get some
sanitizer errors in make check:

TEST: tests/test-string-output-visitor... (pid=31713)
  /string-visitor/output/int:                                          OK
  /string-visitor/output/int:                                          OK
  /string-visitor/output/bool:                                         OK
  /string-visitor/output/bool:                                         OK
  /string-visitor/output/number:
/home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:92:16:OK
 runtime error: signed integer overflow: 9223372036854775807
/string-visitor/output/number:                                       +
1 cannot be represented in type 'long'
OK
  /string-visitor/output/string:                                       OK
[etc]

and later
TEST: tests/test-visitor-serialization... (pid=31729)
[etc]
  /visitor/serialization/String/primitives/boolean_true2:              OK
  /visitor/serialization/String/primitives/boolean_true3:              OK
  /visitor/serialization/String/primitives/boolean_false1:             OK
  /visitor/serialization/String/primitives/boolean_false2:
/home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:83:16:OK
  /visitor/serialization/String/primitives/number_sanity1:
 runtime error: signed integer overflow: 9223372036854775807 + 1
cannot be represented in type OK
'long'
  /visitor/serialization/String/primitives/number_sanity2:
/home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:58:34:OK
 runtime error: signed integer overflow:
/visitor/serialization/String/primitives/number_min:
9223372036854775807 + 1 cannot be represented in type 'long long'
OK
/home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:216:13:
runtime error:   /visitor/serialization/String/primitives/number_max:
               signed integer overflow: 9223372036854775807 + 1 cannot
be represented in type 'int64_t' (aka 'long')
OK
  /visitor/serialization/String/primitives/integer_sanity1:            OK
  /visitor/serialization/String/primitives/integer_sanity2:            OK
[etc]

You can also see these without clang if you run under gdb and put in
appropriate conditional breakpoints (eg string_output_append_range()
with condition (e > 50000). Sample backtrace:

(gdb) bt
#0  string_output_append_range (sov=0x5555557adbc0,
s=9223372036854775806, e=9223372036854775807)
    at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:89
#1  0x000055555558285c in print_type_int (v=0x5555557adbc0,
obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
    at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:158
#2  0x00005555555800ab in visit_type_int (v=0x5555557adbc0,
obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
    at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/qapi-visit-core.c:100
#3  0x000055555555e73f in visit_type_intList (m=0x5555557adbc0,
obj=0x7fffffffdf28, name=0x0, errp=0x7fffffffdf30)
    at qapi-visit.c:57
#4  0x0000555555558263 in test_visitor_out_intList
(data=0x5555557adb30, unused=0x7fffffffe350)
    at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:93
#5  0x00007ffff7b3ea81 in test_case_run (tc=0x5555557ad500) at
/build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2059
#6  g_test_run_suite_internal (suite=suite@entry=0x5555557ac860,
path=path@entry=0x7ffff7b956de "")
    at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2120
#7  0x00007ffff7b3ec46 in g_test_run_suite_internal
(suite=suite@entry=0x5555557ac840,
    path=path@entry=0x7ffff7b956de "") at
/build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
#8  0x00007ffff7b3ec46 in g_test_run_suite_internal
(suite=suite@entry=0x5555557ac820,
    path=path@entry=0x7ffff7b956de "") at
/build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
#9  0x00007ffff7b3ef9b in g_test_run_suite (suite=0x5555557ac820)
    at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2184
#10 0x00007ffff7b3efd1 in g_test_run () at
/build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:1488
#11 0x0000555555558fee in main (argc=1, argv=0x7fffffffe468)
    at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:286

and you can see that 'e' is the max 64 bit signed
integer and we're about to increment it...

Paolo, the file says you wrote this code?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2014-12-23 23:17 [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors Peter Maydell
@ 2015-02-05 17:03 ` Peter Maydell
  2015-05-11  8:53   ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2015-02-05 17:03 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Paolo Bonzini, Michael Roth, Luiz Capitulino

Ping on this warning issue, since I guess everybody missed it
over Christmas :-)

thanks
-- PMM

On 23 December 2014 at 23:17, Peter Maydell <peter.maydell@linaro.org> wrote:
> If you do a clang build with -fsanitize=undefined, then you get some
> sanitizer errors in make check:
>
> TEST: tests/test-string-output-visitor... (pid=31713)
>   /string-visitor/output/int:                                          OK
>   /string-visitor/output/int:                                          OK
>   /string-visitor/output/bool:                                         OK
>   /string-visitor/output/bool:                                         OK
>   /string-visitor/output/number:
> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:92:16:OK
>  runtime error: signed integer overflow: 9223372036854775807
> /string-visitor/output/number:                                       +
> 1 cannot be represented in type 'long'
> OK
>   /string-visitor/output/string:                                       OK
> [etc]
>
> and later
> TEST: tests/test-visitor-serialization... (pid=31729)
> [etc]
>   /visitor/serialization/String/primitives/boolean_true2:              OK
>   /visitor/serialization/String/primitives/boolean_true3:              OK
>   /visitor/serialization/String/primitives/boolean_false1:             OK
>   /visitor/serialization/String/primitives/boolean_false2:
> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:83:16:OK
>   /visitor/serialization/String/primitives/number_sanity1:
>  runtime error: signed integer overflow: 9223372036854775807 + 1
> cannot be represented in type OK
> 'long'
>   /visitor/serialization/String/primitives/number_sanity2:
> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:58:34:OK
>  runtime error: signed integer overflow:
> /visitor/serialization/String/primitives/number_min:
> 9223372036854775807 + 1 cannot be represented in type 'long long'
> OK
> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:216:13:
> runtime error:   /visitor/serialization/String/primitives/number_max:
>                signed integer overflow: 9223372036854775807 + 1 cannot
> be represented in type 'int64_t' (aka 'long')
> OK
>   /visitor/serialization/String/primitives/integer_sanity1:            OK
>   /visitor/serialization/String/primitives/integer_sanity2:            OK
> [etc]
>
> You can also see these without clang if you run under gdb and put in
> appropriate conditional breakpoints (eg string_output_append_range()
> with condition (e > 50000). Sample backtrace:
>
> (gdb) bt
> #0  string_output_append_range (sov=0x5555557adbc0,
> s=9223372036854775806, e=9223372036854775807)
>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:89
> #1  0x000055555558285c in print_type_int (v=0x5555557adbc0,
> obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:158
> #2  0x00005555555800ab in visit_type_int (v=0x5555557adbc0,
> obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/qapi-visit-core.c:100
> #3  0x000055555555e73f in visit_type_intList (m=0x5555557adbc0,
> obj=0x7fffffffdf28, name=0x0, errp=0x7fffffffdf30)
>     at qapi-visit.c:57
> #4  0x0000555555558263 in test_visitor_out_intList
> (data=0x5555557adb30, unused=0x7fffffffe350)
>     at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:93
> #5  0x00007ffff7b3ea81 in test_case_run (tc=0x5555557ad500) at
> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2059
> #6  g_test_run_suite_internal (suite=suite@entry=0x5555557ac860,
> path=path@entry=0x7ffff7b956de "")
>     at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2120
> #7  0x00007ffff7b3ec46 in g_test_run_suite_internal
> (suite=suite@entry=0x5555557ac840,
>     path=path@entry=0x7ffff7b956de "") at
> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
> #8  0x00007ffff7b3ec46 in g_test_run_suite_internal
> (suite=suite@entry=0x5555557ac820,
>     path=path@entry=0x7ffff7b956de "") at
> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
> #9  0x00007ffff7b3ef9b in g_test_run_suite (suite=0x5555557ac820)
>     at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2184
> #10 0x00007ffff7b3efd1 in g_test_run () at
> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:1488
> #11 0x0000555555558fee in main (argc=1, argv=0x7fffffffe468)
>     at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:286
>
> and you can see that 'e' is the max 64 bit signed
> integer and we're about to increment it...
>
> Paolo, the file says you wrote this code?
>
> thanks
> -- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-02-05 17:03 ` Peter Maydell
@ 2015-05-11  8:53   ` Peter Maydell
  2015-05-11  9:07     ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2015-05-11  8:53 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Paolo Bonzini, Michael Roth, Luiz Capitulino

Paolo: ping^2, since we're out of release freeze now?

thanks
-- PMM

On 5 February 2015 at 17:03, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping on this warning issue, since I guess everybody missed it
> over Christmas :-)
>
> thanks
> -- PMM
>
> On 23 December 2014 at 23:17, Peter Maydell <peter.maydell@linaro.org> wrote:
>> If you do a clang build with -fsanitize=undefined, then you get some
>> sanitizer errors in make check:
>>
>> TEST: tests/test-string-output-visitor... (pid=31713)
>>   /string-visitor/output/int:                                          OK
>>   /string-visitor/output/int:                                          OK
>>   /string-visitor/output/bool:                                         OK
>>   /string-visitor/output/bool:                                         OK
>>   /string-visitor/output/number:
>> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:92:16:OK
>>  runtime error: signed integer overflow: 9223372036854775807
>> /string-visitor/output/number:                                       +
>> 1 cannot be represented in type 'long'
>> OK
>>   /string-visitor/output/string:                                       OK
>> [etc]
>>
>> and later
>> TEST: tests/test-visitor-serialization... (pid=31729)
>> [etc]
>>   /visitor/serialization/String/primitives/boolean_true2:              OK
>>   /visitor/serialization/String/primitives/boolean_true3:              OK
>>   /visitor/serialization/String/primitives/boolean_false1:             OK
>>   /visitor/serialization/String/primitives/boolean_false2:
>> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:83:16:OK
>>   /visitor/serialization/String/primitives/number_sanity1:
>>  runtime error: signed integer overflow: 9223372036854775807 + 1
>> cannot be represented in type OK
>> 'long'
>>   /visitor/serialization/String/primitives/number_sanity2:
>> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:58:34:OK
>>  runtime error: signed integer overflow:
>> /visitor/serialization/String/primitives/number_min:
>> 9223372036854775807 + 1 cannot be represented in type 'long long'
>> OK
>> /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-input-visitor.c:216:13:
>> runtime error:   /visitor/serialization/String/primitives/number_max:
>>                signed integer overflow: 9223372036854775807 + 1 cannot
>> be represented in type 'int64_t' (aka 'long')
>> OK
>>   /visitor/serialization/String/primitives/integer_sanity1:            OK
>>   /visitor/serialization/String/primitives/integer_sanity2:            OK
>> [etc]
>>
>> You can also see these without clang if you run under gdb and put in
>> appropriate conditional breakpoints (eg string_output_append_range()
>> with condition (e > 50000). Sample backtrace:
>>
>> (gdb) bt
>> #0  string_output_append_range (sov=0x5555557adbc0,
>> s=9223372036854775806, e=9223372036854775807)
>>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:89
>> #1  0x000055555558285c in print_type_int (v=0x5555557adbc0,
>> obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
>>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/string-output-visitor.c:158
>> #2  0x00005555555800ab in visit_type_int (v=0x5555557adbc0,
>> obj=0x5555557adec0, name=0x0, errp=0x7fffffffdec8)
>>     at /home/petmay01/linaro/qemu-from-laptop/qemu/qapi/qapi-visit-core.c:100
>> #3  0x000055555555e73f in visit_type_intList (m=0x5555557adbc0,
>> obj=0x7fffffffdf28, name=0x0, errp=0x7fffffffdf30)
>>     at qapi-visit.c:57
>> #4  0x0000555555558263 in test_visitor_out_intList
>> (data=0x5555557adb30, unused=0x7fffffffe350)
>>     at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:93
>> #5  0x00007ffff7b3ea81 in test_case_run (tc=0x5555557ad500) at
>> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2059
>> #6  g_test_run_suite_internal (suite=suite@entry=0x5555557ac860,
>> path=path@entry=0x7ffff7b956de "")
>>     at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2120
>> #7  0x00007ffff7b3ec46 in g_test_run_suite_internal
>> (suite=suite@entry=0x5555557ac840,
>>     path=path@entry=0x7ffff7b956de "") at
>> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
>> #8  0x00007ffff7b3ec46 in g_test_run_suite_internal
>> (suite=suite@entry=0x5555557ac820,
>>     path=path@entry=0x7ffff7b956de "") at
>> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2131
>> #9  0x00007ffff7b3ef9b in g_test_run_suite (suite=0x5555557ac820)
>>     at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2184
>> #10 0x00007ffff7b3efd1 in g_test_run () at
>> /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:1488
>> #11 0x0000555555558fee in main (argc=1, argv=0x7fffffffe468)
>>     at /home/petmay01/linaro/qemu-from-laptop/qemu/tests/test-string-output-visitor.c:286
>>
>> and you can see that 'e' is the max 64 bit signed
>> integer and we're about to increment it...
>>
>> Paolo, the file says you wrote this code?
>>
>> thanks
>> -- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-05-11  8:53   ` Peter Maydell
@ 2015-05-11  9:07     ` Paolo Bonzini
  2015-05-29 10:56       ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2015-05-11  9:07 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developers; +Cc: Michael Roth, Luiz Capitulino



On 11/05/2015 10:53, Peter Maydell wrote:
> Paolo: ping^2, since we're out of release freeze now?

I have some patches, but this isn't really the best time for me to post
them...

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-05-11  9:07     ` Paolo Bonzini
@ 2015-05-29 10:56       ` Peter Maydell
  2015-05-29 11:12         ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2015-05-29 10:56 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Michael Roth, QEMU Developers, Luiz Capitulino

On 11 May 2015 at 10:07, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 11/05/2015 10:53, Peter Maydell wrote:
>> Paolo: ping^2, since we're out of release freeze now?
>
> I have some patches, but this isn't really the best time for me to post
> them...

Ping...has the timing improved?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-05-29 10:56       ` Peter Maydell
@ 2015-05-29 11:12         ` Paolo Bonzini
  2015-10-01 10:47           ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2015-05-29 11:12 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Luiz Capitulino, Michael Roth, QEMU Developers



On 29/05/2015 12:56, Peter Maydell wrote:
>>> >> Paolo: ping^2, since we're out of release freeze now?
>> >
>> > I have some patches, but this isn't really the best time for me to post
>> > them...
> Ping...has the timing improved?

Almost. :)  Next week, promised.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-05-29 11:12         ` Paolo Bonzini
@ 2015-10-01 10:47           ` Peter Maydell
  2015-10-01 13:38             ` Paolo Bonzini
  2015-10-01 14:58             ` Eric Blake
  0 siblings, 2 replies; 13+ messages in thread
From: Peter Maydell @ 2015-10-01 10:47 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Luiz Capitulino, Michael Roth, QEMU Developers

On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 29/05/2015 12:56, Peter Maydell wrote:
>>>> >> Paolo: ping^2, since we're out of release freeze now?
>>> >
>>> > I have some patches, but this isn't really the best time for me to post
>>> > them...
>> Ping...has the timing improved?
>
> Almost. :)  Next week, promised.

Ping again, six months later...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-10-01 10:47           ` Peter Maydell
@ 2015-10-01 13:38             ` Paolo Bonzini
  2015-11-05 20:05               ` John Snow
  2015-10-01 14:58             ` Eric Blake
  1 sibling, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2015-10-01 13:38 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Luiz Capitulino, Michael Roth, QEMU Developers



On 01/10/2015 12:47, Peter Maydell wrote:
> On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>>
>> On 29/05/2015 12:56, Peter Maydell wrote:
>>>>>>> Paolo: ping^2, since we're out of release freeze now?
>>>>>
>>>>> I have some patches, but this isn't really the best time for me to post
>>>>> them...
>>> Ping...has the timing improved?
>>
>> Almost. :)  Next week, promised.
> 
> Ping again, six months later...

Uh, I thought they were already in. :)

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-10-01 10:47           ` Peter Maydell
  2015-10-01 13:38             ` Paolo Bonzini
@ 2015-10-01 14:58             ` Eric Blake
  1 sibling, 0 replies; 13+ messages in thread
From: Eric Blake @ 2015-10-01 14:58 UTC (permalink / raw)
  To: Peter Maydell, Paolo Bonzini
  Cc: QEMU Developers, Markus Armbruster, Michael Roth,
	Andreas Färber, Luiz Capitulino

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

On 10/01/2015 04:47 AM, Peter Maydell wrote:
> On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>>
>> On 29/05/2015 12:56, Peter Maydell wrote:
>>>>>>> Paolo: ping^2, since we're out of release freeze now?
>>>>>
>>>>> I have some patches, but this isn't really the best time for me to post
>>>>> them...
>>> Ping...has the timing improved?
>>
>> Almost. :)  Next week, promised.
> 
> Ping again, six months later...

Interesting, since we now have another thread that is also trying to
improve the visitors:

https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg06633.html

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-10-01 13:38             ` Paolo Bonzini
@ 2015-11-05 20:05               ` John Snow
  2016-01-14 11:15                 ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: John Snow @ 2015-11-05 20:05 UTC (permalink / raw)
  To: Paolo Bonzini, Peter Maydell
  Cc: QEMU Developers, Michael Roth, Luiz Capitulino



On 10/01/2015 09:38 AM, Paolo Bonzini wrote:
> 
> 
> On 01/10/2015 12:47, Peter Maydell wrote:
>> On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>
>>>
>>> On 29/05/2015 12:56, Peter Maydell wrote:
>>>>>>>> Paolo: ping^2, since we're out of release freeze now?
>>>>>>
>>>>>> I have some patches, but this isn't really the best time for me to post
>>>>>> them...
>>>> Ping...has the timing improved?
>>>
>>> Almost. :)  Next week, promised.
>>
>> Ping again, six months later...
> 
> Uh, I thought they were already in. :)
> 
> Paolo
> 

Did patches ever get posted to list for this?

--js

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2015-11-05 20:05               ` John Snow
@ 2016-01-14 11:15                 ` Peter Maydell
  2016-01-14 12:44                   ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2016-01-14 11:15 UTC (permalink / raw)
  To: John Snow; +Cc: QEMU Developers, Paolo Bonzini, Michael Roth, Luiz Capitulino

On 5 November 2015 at 20:05, John Snow <jsnow@redhat.com> wrote:
>
>
> On 10/01/2015 09:38 AM, Paolo Bonzini wrote:
>>
>>
>> On 01/10/2015 12:47, Peter Maydell wrote:
>>> On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>
>>>>
>>>> On 29/05/2015 12:56, Peter Maydell wrote:
>>>>>>>>> Paolo: ping^2, since we're out of release freeze now?
>>>>>>>
>>>>>>> I have some patches, but this isn't really the best time for me to post
>>>>>>> them...
>>>>> Ping...has the timing improved?
>>>>
>>>> Almost. :)  Next week, promised.
>>>
>>> Ping again, six months later...
>>
>> Uh, I thought they were already in. :)
>>
>> Paolo
>>
>
> Did patches ever get posted to list for this?

Not that I saw -- ping again, Paolo. This is the only warning
that clang's sanitizer currently produces for me, and arithmetic
overflows on addition seem genuinely worth investigation...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2016-01-14 11:15                 ` Peter Maydell
@ 2016-01-14 12:44                   ` Paolo Bonzini
  2016-01-14 12:52                     ` Peter Maydell
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2016-01-14 12:44 UTC (permalink / raw)
  To: Peter Maydell, John Snow; +Cc: Luiz Capitulino, QEMU Developers, Michael Roth



On 14/01/2016 12:15, Peter Maydell wrote:
> On 5 November 2015 at 20:05, John Snow <jsnow@redhat.com> wrote:
>>
>>
>> On 10/01/2015 09:38 AM, Paolo Bonzini wrote:
>>>
>>>
>>> On 01/10/2015 12:47, Peter Maydell wrote:
>>>> On 29 May 2015 at 12:12, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>>
>>>>>
>>>>> On 29/05/2015 12:56, Peter Maydell wrote:
>>>>>>>>>> Paolo: ping^2, since we're out of release freeze now?
>>>>>>>>
>>>>>>>> I have some patches, but this isn't really the best time for me to post
>>>>>>>> them...
>>>>>> Ping...has the timing improved?
>>>>>
>>>>> Almost. :)  Next week, promised.
>>>>
>>>> Ping again, six months later...
>>>
>>> Uh, I thought they were already in. :)
>>>
>>> Paolo
>>>
>>
>> Did patches ever get posted to list for this?
> 
> Not that I saw -- ping again, Paolo. This is the only warning
> that clang's sanitizer currently produces for me, and arithmetic
> overflows on addition seem genuinely worth investigation...

It happens when the range is 2^64 in size.

Does it still matter if we've decided to use -fwrapv because of left
shifts?  Or are we still considering the possibility to use -std=gnu89
(where left shifts give unspecified behavior rather than undefined)?

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
  2016-01-14 12:44                   ` Paolo Bonzini
@ 2016-01-14 12:52                     ` Peter Maydell
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Maydell @ 2016-01-14 12:52 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Luiz Capitulino, John Snow, QEMU Developers, Michael Roth

On 14 January 2016 at 12:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 14/01/2016 12:15, Peter Maydell wrote:
>> Not that I saw -- ping again, Paolo. This is the only warning
>> that clang's sanitizer currently produces for me, and arithmetic
>> overflows on addition seem genuinely worth investigation...
>
> It happens when the range is 2^64 in size.
>
> Does it still matter if we've decided to use -fwrapv because of left
> shifts?  Or are we still considering the possibility to use -std=gnu89
> (where left shifts give unspecified behavior rather than undefined)?

I think we agreed that we wanted signed shift behaviour if we
could get it, but this is all addition. The code looks a bit
odd to me anyway -- the Range type specifies ranges within a
64-bit address space and thus an unsigned start and end point,
but the code in string-output-visitor.c is specifically using
and feeding in signed values for the start and end.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-01-14 12:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-23 23:17 [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors Peter Maydell
2015-02-05 17:03 ` Peter Maydell
2015-05-11  8:53   ` Peter Maydell
2015-05-11  9:07     ` Paolo Bonzini
2015-05-29 10:56       ` Peter Maydell
2015-05-29 11:12         ` Paolo Bonzini
2015-10-01 10:47           ` Peter Maydell
2015-10-01 13:38             ` Paolo Bonzini
2015-11-05 20:05               ` John Snow
2016-01-14 11:15                 ` Peter Maydell
2016-01-14 12:44                   ` Paolo Bonzini
2016-01-14 12:52                     ` Peter Maydell
2015-10-01 14:58             ` Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.