[Patch] fix IDL hang V2

Jelmer Vernooij jelmer at samba.org
Thu Aug 21 10:34:38 MDT 2014

On Thu, Aug 21, 2014 at 12:01:28PM +0100, Noel Power wrote:
> On 07/08/14 12:22, Noel Power wrote:
> > Hi,
> >
> > issuing
> >
> > ./pidl/pidl --header --ndr-parser -- foo.idl
> >
> > will cause pidl to hang, the attached patch prevents the recursion that
> > triggers that. Note: I compared the contents of
> > bin/default/librpc/gen_ndr before and after the patch and the contents
> > are identical
> >
> > Noel
> Note previous version had a bug, attached in a newer version, and also
> less error-filled example idl(s) ( one that can be used with midl, one
> with pidl). As previously mentioned it appears such a recursive
> structure arrangement seems to cause MIDL to barf [1], I still don't
> believe that is a reason for pidl to similarly fail (or hang), note:
> also the ndr marshall/unmarshall generated work fine

I'm wary of supporting constructions that are pidl-specific. We'd like to
make our IDL files more compatible with midl, not less. 

Please add tests for new features (see t/ under the pidl/ directory).

How does this handle nested struct without pointers? Does it error out?

struct foo {
  struct bar a;
  hyper t;

struct bar {
  struct foo b;



More information about the samba-technical mailing list