All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h
@ 2011-12-11  6:47 Brad Smith
  2011-12-11 10:53 ` Stefan Weil
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Brad Smith @ 2011-12-11  6:47 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

  CC    i386-softmmu/monitor.o
/buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
/buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

qemu-common.h has...

#ifndef TIME_MAX
#define TIME_MAX LONG_MAX
#endif

for OpenBSD this should be INT_MAX.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  New

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* Re: [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
@ 2011-12-11 10:53 ` Stefan Weil
  2012-01-10 23:42 ` Brad Smith
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2011-12-11 10:53 UTC (permalink / raw)
  To: Bug 902720; +Cc: qemu-devel, Gerd Hoffmann

Am 11.12.2011 07:47, schrieb Brad Smith:
> Public bug reported:
>
> Looking at the OpenBSD buildbot logs I noticed a warning that appears 
> to be a bug in the code.
> OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 
> 64-bit).
>
> CC i386-softmmu/monitor.o
> /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 
> 'expire_password':
> /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: 
> overflow in implicit constant conversion
>
> qemu-common.h has...
>
> #ifndef TIME_MAX
> #define TIME_MAX LONG_MAX
> #endif
>
> for OpenBSD this should be INT_MAX.
>
> ** Affects: qemu
> Importance: Undecided
> Status: New

This needs special handling for w32 / w64, too.
Looking at the code where TIME_MAX is used, I assume that
more fixes are needed. The following code for example
won't work:

   if (lifetime > INT_MAX) {

What about using

   #define TIME_FOREVER -1

instead of TIME_MAX? Of course this would need additional
code changes.

Regards,
Stefan Weil

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

* Re: [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
  2011-12-11 10:53 ` Stefan Weil
@ 2012-01-10 23:42 ` Brad Smith
  2012-01-11 10:55   ` Gerd Hoffmann
  2017-10-28 14:44 ` [Qemu-devel] [Bug 902720] " Thomas Huth
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Brad Smith @ 2012-01-10 23:42 UTC (permalink / raw)
  To: qemu-devel

On 11/12/11 5:53 AM, Stefan Weil wrote:
> Am 11.12.2011 07:47, schrieb Brad Smith:
>> Public bug reported:
>>
>> Looking at the OpenBSD buildbot logs I noticed a warning that appears
>> to be a bug in the code.
>> OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and
>> 64-bit).
>>
>> CC i386-softmmu/monitor.o
>> /buildbot-qemu/default_openbsd_current/build/monitor.c: In function
>> 'expire_password':
>> /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning:
>> overflow in implicit constant conversion
>>
>> qemu-common.h has...
>>
>> #ifndef TIME_MAX
>> #define TIME_MAX LONG_MAX
>> #endif
>>
>> for OpenBSD this should be INT_MAX.
>>
>> ** Affects: qemu
>> Importance: Undecided
>> Status: New
>
> This needs special handling for w32 / w64, too.
> Looking at the code where TIME_MAX is used, I assume that
> more fixes are needed. The following code for example
> won't work:
>
> if (lifetime > INT_MAX) {
>
> What about using
>
> #define TIME_FOREVER -1
>
> instead of TIME_MAX? Of course this would need additional
> code changes.
>
> Regards,
> Stefan Weil

Gerd?

Still looking for comment on this since you added the initial code which
has this bug in it.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  New

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* Re: [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2012-01-10 23:42 ` Brad Smith
@ 2012-01-11 10:55   ` Gerd Hoffmann
  0 siblings, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2012-01-11 10:55 UTC (permalink / raw)
  To: qemu-devel

Hi,

>>> Looking at the OpenBSD buildbot logs I noticed a warning that appears
>>> to be a bug in the code.
>>> OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and
>>> 64-bit).

Ouch.  Adding 64bit arch with 32bit time_t is pretty lame IMHO.  There
are a bunch of years left to fix that that though.

>>> #ifndef TIME_MAX
>>> #define TIME_MAX LONG_MAX
>>> #endif
>>>
>>> for OpenBSD this should be INT_MAX.

Guess we'll need an #ifdef then.

>> This needs special handling for w32 / w64, too.
>> Looking at the code where TIME_MAX is used, I assume that
>> more fixes are needed. The following code for example
>> won't work:
>>
>> if (lifetime > INT_MAX) {

With 32bit time_t lifetime wouldn't become larger than INT_MAX anyway,
so it doesn't matter ;)

> Still looking for comment on this since you added the initial code which
> has this bug in it.

cheers,
  Gerd

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  New

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* [Qemu-devel] [Bug 902720] Re: TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
  2011-12-11 10:53 ` Stefan Weil
  2012-01-10 23:42 ` Brad Smith
@ 2017-10-28 14:44 ` Thomas Huth
  2017-10-28 15:58 ` Brad Smith
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-10-28 14:44 UTC (permalink / raw)
  To: qemu-devel

Triaging old bug tickets... can you still reproduce this issue with the
latest version of QEMU? Or could we close this ticket nowadays?


** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  Incomplete

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* [Qemu-devel] [Bug 902720] Re: TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
                   ` (2 preceding siblings ...)
  2017-10-28 14:44 ` [Qemu-devel] [Bug 902720] " Thomas Huth
@ 2017-10-28 15:58 ` Brad Smith
  2017-10-28 16:43 ` Thomas Huth
  2018-04-13 10:49 ` Peter Maydell
  5 siblings, 0 replies; 8+ messages in thread
From: Brad Smith @ 2017-10-28 15:58 UTC (permalink / raw)
  To: qemu-devel

Since this bug report was filed OpenBSD has switched from 32-bit time_t
to 64-bit time_t on all archs (yes, including 32-bit archs like i386,
arm, powerpc). So instead of INT_MAX TIME_MAX should now be set to
LLONG_MAX.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  Incomplete

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* [Qemu-devel] [Bug 902720] Re: TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
                   ` (3 preceding siblings ...)
  2017-10-28 15:58 ` Brad Smith
@ 2017-10-28 16:43 ` Thomas Huth
  2018-04-13 10:49 ` Peter Maydell
  5 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-10-28 16:43 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Incomplete => Triaged

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  Triaged

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

* [Qemu-devel] [Bug 902720] Re: TIME_MAX not set correctly for OpenBSD in qemu-common.h
  2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
                   ` (4 preceding siblings ...)
  2017-10-28 16:43 ` Thomas Huth
@ 2018-04-13 10:49 ` Peter Maydell
  5 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2018-04-13 10:49 UTC (permalink / raw)
  To: qemu-devel

This was fixed in commit e7b47c22e2df14d, which was in the 2.11.0
release.


** Changed in: qemu
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/902720

Title:
  TIME_MAX not set correctly for OpenBSD in qemu-common.h

Status in QEMU:
  Fix Released

Bug description:
  Looking at the OpenBSD buildbot logs I noticed a warning that appears to be a bug in the code.
  OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit).

    CC    i386-softmmu/monitor.o
  /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expire_password':
  /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: overflow in implicit constant conversion

  qemu-common.h has...

  #ifndef TIME_MAX
  #define TIME_MAX LONG_MAX
  #endif

  for OpenBSD this should be INT_MAX.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions

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

end of thread, other threads:[~2018-04-13 11:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-11  6:47 [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Brad Smith
2011-12-11 10:53 ` Stefan Weil
2012-01-10 23:42 ` Brad Smith
2012-01-11 10:55   ` Gerd Hoffmann
2017-10-28 14:44 ` [Qemu-devel] [Bug 902720] " Thomas Huth
2017-10-28 15:58 ` Brad Smith
2017-10-28 16:43 ` Thomas Huth
2018-04-13 10:49 ` Peter Maydell

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.