Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Config reload SIGSEGV in the spotlight

2004-05-29 by Cyril Guibourg

manu@... writes:

> Now the problem is spotted, anyone knows the fix? Is there some special
> function to call in order to book a bigger stack for a thread?

Please ignore my previous silly answer :-[

I do have very good news !!!!

Check this:

$ cat x.c
#include <stdio.h>

#define THREAD_STACK_SIZE 5*1024*1024

void func(void);

int main(void) {
  static char buf[5 * 1024 * 1024];      /* 5 MB */

  buf[sizeof(buf) - 1] = '\0';    /* Check we got the memory */
  printf("before func\n");
  func();
  printf("after func\n");
  
  return;
}


void func(void) {
        printf("function\n");
        return;
}

[cyril@blackbox:~ 18:06:51]
$ cc -pthread -o x x.c

[cyril@blackbox:~ 18:06:55]
$ ./x
before func
function
after func

I will try this on milter-greylist asap. Anyway, do you have a mean to figure
out how large shall be the stack ?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.