Re: big orbit problem.

um,  here is all the code up to the resulting corruption. I dont see
anything that would corrupt memory like you said. and besides, the value
is being change at CORBA_string_dup and not before.

  FILE *temphndl;
  CORBA_char buffer[1024];
  CORBA_char variable[256];
  CORBA_char *tempptr;
  CORBA_char **tempptr2;
  int count;
  CosNaming_NamingContext ns_root;
  CosNaming_NameComponent name_component[2] = {{"COAL", "subcontext"}, 
                                               {"default", "object"} };
  CosNaming_Name name = {2, 2, name_component, CORBA_FALSE};
  blade_env *blade=(blade_env*)malloc(sizeof(blade_env));
  blade->orb = CORBA_ORB_init(argc, argv, "orbit-local-orb", blade->ev);
  if(context==NULL||!strcmp(context, "")){

Boom. If you can show me where the corruption is, great. But, I dont see
anything in the code that would do that.

On Thu, 11 Nov 1999, Havoc Pennington wrote:

> On Thu, 11 Nov 1999 wrote:
> > 
> > CORBA_string_dup is somehow doing something to the memory around it.
> > *argc before is 1 like it should be, and
> > after, argc is NULL. This is bad. Very BAD.
> > It is odd that it doesnt segfault the program flat out.
> > 
> > This is not the first time I have seen CORBA_string_dup do this.
> > 
> It isn't CORBA_string_dup, and it's not odd that the program doesn't
> segfault. What you have here is random memory corruption; it happens to
> write over argc. Because argc is valid memory, you get no segfault.
> So, you need to find what part of your program is screwing up memory it
> isn't supposed to touch.
> Havoc

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]