Re: [jira] [Commented] (PROTON-488) Windows 7 64-bit VS2010 qpid-proton Crash on Startup with Send / Recv Application

2014-03-14 Thread Fraser Adams

Hi Cliff,
FYI I've just this minute merged all the latest updates to proton-c onto 
the branch I'm using for the JavaScript bindings and have rebuilt 
everything, the changes that you've done for this Jira work beautifully 
for me too!!! Many thanks, you're a star.


Cheers,
Frase

On 28/02/14 08:48, Cliff Jansen wrote:

Sorry for the delay.

I played a bit with emcripten  to see if there was some
misunderstanding going on, but it seems pretty clear that clang knows
exactly what is being passed in via the va_arg call and just plain
refuses to deal with a struct (at least for some architectures).

Consequently the original patch which restricts va_arg processing to
simple types seems to me the most robust and portable solution.  I
will proceed with that for 0.7.

Cliff



a bit indicates to me that clang is not somehow confused about

On Thu, Feb 27, 2014 at 9:01 AM, Fraser Adams
fraser.ad...@blueyonder.co.uk wrote:

Hi again Cliff,
Have you made any progress on this?
Cheers,
Frase


On 30/01/14 02:31, Cliff Jansen wrote:

Well thanks for all that.  I'll certainly take another look and report
back before committing anything.  Giving a compiler family indigestion
is certainly to be avoided.

Cliff

On Tue, Jan 28, 2014 at 11:29 AM, Fraser Adams
fraser.ad...@blueyonder.co.uk wrote:

Hi, me again Cliff.
I've only had time to recheck this against my test case, which is
representative of what I see for real.

Doing:

int pn_data_vfill2(const char *fmt, va_list ap)
{
  // Process the PROPERTIES constant - this seems OK
  uint64_t prop = va_arg(ap, uint64_t);
printf(prop = %llu\n, prop);

  {
  pn_bytes_t bytes = va_arg(ap, pn_bytes_t);
printf(pn_data_vfill z, bytes.size = %zu, bytes.start = %s\n,
bytes.size,
bytes.start);
  }

  // Process the char* returned by pn_string_get()
  {
  char *start = va_arg(ap, char *);
  size_t size = strlen(start);
printf(pn_data_vfill size = %zu\n, size);
printf(pn_data_vfill string = %s\n, start);
  }

  return 0;
}

E.g. the both passing and retrieving structs approach of your second
approach actually doesn't even compile for me with LLVM le32,  I get

error:
cannot compile this aggregate va_arg expression yet
  pn_bytes_t bytes = va_arg(ap, pn_bytes_t);
 ^~
/home/fadams/emscripten/system/include/libc/stdarg.h:15:25: note:
expanded
from
macro 'va_arg'
#define va_arg(v,l) __builtin_va_arg(v,l)
  ^
1 error generated.
ERRORroot: compiler frontend failed to generate LLVM bitcode, halting
make[2]: *** [CMakeFiles/test_varargs.dir/test_varargs.o] Error 1
make[1]: *** [CMakeFiles/test_varargs.dir/all] Error 2
make: *** [all] Error 2

Though it *does* work if I do EMCC_LLVM_TARGET=i386-pc-linux-gnu make


So in a nutshell:
1) if I fudge the LLVM front end pure struct, put  struct retrieve
discrete
and pure discrete values all work correctly.

2) with the standard emscripten le32 LLVM front end (which is what is
recommended)
* pure struct (as above) fails to compile
* put  struct, retrieve discrete (as with the original Proton code) gives
the wrong results - that messed with my head :-)
* pure discrete values (as with your pn_string_size(msg-user_id),
pn_string_get(msg-user_id),) patch works correctly.


So I'd *really* like it if you could go down the path of your original
patch
'cause that would fix what you've been seeing and let me compile the
JavaScript stuff without needing the environment tweaked (which is an
accident waiting to happen). I hope that you are agreeable to that?

I think that it would probably be worth putting a comment in the call to
pn_data_fill and within the pn_data_vfill() 'z' case body to document
that
it's safer to pass individual entries to va_arg to avoid upsetting some
compilers - it's not entirely an *obvious* thing really :-D

Cheers,
Frase




On 27/01/14 21:21, Cliff Jansen wrote:

Thanks for the Javascript related info.

Fraser: can you test if the review board patch (with the struct in
and out strategy) works in your case with the unhacked llvm setup?
If that works then I'll go ahead and check it in.

If it fails, please try the first patch.  If that works, we will just
have to conclude that compilers have trouble with stucts in this case
and fall back to passing the two basic types.  That should be safe to
work in the greatest number of cases.

Many thanks.

On Mon, Jan 27, 2014 at 1:13 PM, Fraser Adams (JIRA) j...@apache.org
wrote:

   [

https://issues.apache.org/jira/browse/PROTON-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13883314#comment-13883314
]

Fraser Adams commented on PROTON-488:
-

Oh to be clear
either struct in and out, or separate size_t and char* in and out

what I meant in my previous comment was that the separate size_t and
char* in and out is what LLVM le32 is 

[jira] [Resolved] (PROTON-532) wrong deadline computed in pn_selector_select

2014-03-14 Thread Rafael H. Schloming (JIRA)

 [ 
https://issues.apache.org/jira/browse/PROTON-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rafael H. Schloming resolved PROTON-532.


Resolution: Fixed

 wrong deadline computed in pn_selector_select
 -

 Key: PROTON-532
 URL: https://issues.apache.org/jira/browse/PROTON-532
 Project: Qpid Proton
  Issue Type: Bug
  Components: proton-c
Affects Versions: 0.7
Reporter: Cliff Jansen
 Fix For: 0.7


 The furthest future deadline is computed, but the earliest is wanted



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Proton 0.7 RC1

2014-03-14 Thread Rafael Schloming
Hi Everyone,

There's been a bunch of key improvements/fixes since Proton 0.6, so it's
probably about time for a new release. I've just posted the first RC in the
usual places. Please check it out and give a shout if you run into any
issues.

Source artifacts:

  http://people.apache.org/~rhs/qpid-proton-0.7rc1/

Java binaries:

  https://repository.apache.org/content/repositories/orgapacheqpid-1001/

--Rafael


Selectable readable/writable APIs

2014-03-14 Thread Darryl L. Pierce
The names are very confusing to me. When I first looked at them they
sounded like boolean methods regaring the readable/writable state of the
underlying descriptor. But from what I've gathered they actually are
methods to _perform_ reading and writing, respectively.

Can we change those names to something more like a verb or an action
phrase  than an adjective? Maybe receive_bytes and send_bytes or
read and flush?

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/



pgpRRN4cZch0X.pgp
Description: PGP signature