Skip to content
Snippets Groups Projects
  • Andre Maroneze's avatar
    bd6f3f55
    [libc] change internal representation of fd_set_t · bd6f3f55
    Andre Maroneze authored
    Some case studies (e.g. dyad) use some ugly casts from fd_set_t which lead
    to the analysis stopping too early.
    Changing the representation of fd_set_t should also help it better conform to
    the standard (since a fd_set_t should be able to hold FD_SETSIZE elements).
    bd6f3f55
    History
    [libc] change internal representation of fd_set_t
    Andre Maroneze authored
    Some case studies (e.g. dyad) use some ugly casts from fd_set_t which lead
    to the analysis stopping too early.
    Changing the representation of fd_set_t should also help it better conform to
    the standard (since a fd_set_t should be able to hold FD_SETSIZE elements).
automalloc.i 408 B
/* run.config*
   STDOPT: #"-no-val-builtins-auto"
*/
typedef unsigned int size_t;

void*malloc(size_t s);
void*realloc(void*ptr,size_t s);
void*alloca(size_t s);
void free (void * ptr);
void*calloc (size_t nmemb, size_t size);

void main(int test) {
  char * buf=0;
  if (test) buf = (char*)malloc(sizeof(char)*5);
  else buf = (char*)realloc(&test,sizeof(char)*6);
  
  if (test) buf[1] = 16;

  return;
}