Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-13 Thread Daniel P. Berrange
On Thu, Jul 13, 2017 at 07:52:56AM -0400, Marc-André Lureau wrote: > > > - Original Message - > > > > FYI, I intend to push these revert patches, so that virtlogd stops > > crashing to unblock other devs/users, while we focus on writing & > > reviewing the new approach we've discussed >

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-13 Thread Marc-André Lureau
- Original Message - > On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > > This reverts commit

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-13 Thread Martin Kletzander
On Thu, Jul 13, 2017 at 12:28:41PM +0100, Daniel P. Berrange wrote: On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > This reverts commit

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-13 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > This reverts commit e4b980c853d2114b25fa805a84ea288384416221. > > > > > > When a

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-13 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 05:07:56PM +0100, Daniel P. Berrange wrote: On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote: Also, having the weak alias we can drop all the mocks and the problems with them and just redefine the functions we would like to mock in the tests (see

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > > This

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > > This

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > This reverts commit e4b980c853d2114b25fa805a84ea288384416221. > > > > When a binary links against a .a archive (as opposed to a shared library), > > any

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are marked as 'weak' get silently dropped. As a result when the binary

[libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are marked as 'weak' get silently dropped. As a result when the binary later runs, those 'weak' functions have an address of 0x0 and thus