If patterns has a trailing slash then glob has to match directories only. http://pubs.opengroup.org/onlinepubs/9699919799/. Here posix specifies "An ordinary character is a pattern that shall match itself. It can be any character in the supported character set except for NUL, those special shell characters in Quoting that require quoting, and the following three special pattern characters." If the pattern is only 2 characters long (e.g. */) glob already matches directories only. If the pattern is longer e.g. hello*/ then glob matches only directories or files and directoires depending on type in readdir_result.
Fixed in glibc 2.19. *** This bug has been marked as a duplicate of bug 10278 ***