Pre-defined Queries

Custom Query (11976 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 11976)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#4106 fixed mmap() doesn't zero the last page axeld zooey
Description

According to POSIX, mmap() is supposed to fill the area in the last page that is not "covered" by the mapped file with zeros.

Our mmap does not do this, which causes gcc's fixincl program to crash, as it relies on these zeros to be there in order to invoke strlen(). If there's no zero in the "empty" area of the last page, strlen will try to access the following page and segfault.

The current implementation seems to just read the corresponding BFS block(s) until all pages have been filled, as fixincl always crashes with the same file, but will not crash on a copy of that file (which obviously happens to have a trailing zero somewhere).

This is with hrev31642.

#6113 fixed Locale Kit needs a way to load catalogs from libraries pulkomandy zooey
Description

Currently, the locale kit API only offers ways for apps and add-ons to load a catalog, but the same can't be done from a library (like libtracker, for instance).

This is just one part of the needed Locale Kit API overhaul this summer.

#6373 fixed Bluetooth address macros are broken oruizdorantes zooey
Description

The bluetooth.h header defines these bdaddr_t macros:

#define BDADDR_NULL		(&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
#define BDADDR_LOCAL		(&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
#define BDADDR_BROADCAST	(&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})

However, the concept of getting an address of a compound literal is pretty much broken, as compound literals are neither part of the C++ standard (though gcc supports them) and their lifetime is not well-controlled inside of a macro.

As an example:

struct foo {
    bdaddr_t peer;
};

void bar()
{
    foo myfoo;
    if (...)
        myfoo.peer = BDADDR_LOCAL;
    else
        myfoo.peer = BDADDR_NULL;

    // try doing something with myfoo, but the actuall bdaddr_t object will
    // be dead here already, so the data at the address myfoo.peer may have
    // been overwritten
}

Instead, I suggest doing something along the lines of:

extern const bdaddr_t __BDADDR_NULL;
extern const bdaddr_t __BDADDR_LOCAL;
extern const bdaddr_t __BDADDR_BROADCAST;

#define BDADDR_NULL		(&__BDADDR_NULL)
#define BDADDR_LOCAL		(&__BDADDR_LOCAL)
#define BDADDR_BROADCAST	(&__BDADDR_BROADCAST)

and then define these constants somewhere in an implementation file that gets linked by all users of those macros.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.