Giter Site home page Giter Site logo

libmowgli-2's Introduction

Atheme IRC Services

Atheme is a set of IRC services designed for large IRC networks with high scalability requirements. It is relatively mature software, with some code and design derived from another package called Shrike.

Atheme's behavior is tunable using modules and a highly detailed configuration file. Almost all behavior can be changed at deployment time just by editing the configuration.

Obtaining Atheme

If you have a modern version of Git (1.6.5 or newer), you can recursively clone the repository:

$ git clone --recursive 'https://github.com/atheme/atheme/' atheme-devel
$ cd atheme-devel

If you have an older version of Git, you must clone the repository, and then fetch its submodules:

$ git clone 'https://github.com/atheme/atheme/' atheme-devel
$ cd atheme-devel
$ git submodule init
$ git submodule update

If you don't have Git, you can download a package archive from our website at https://atheme.github.io/.

If you are browsing our GitHub repository, please do NOT click the "Download ZIP" button or the "Source code" links there, as they will give you an archive that lacks the required submodules. There are proper .tar.bz2 or .tar.xz archives attached to each release under "Assets", which is what the "Download" button on our website will take you to.

Basic build instructions for the impatient

Obtain the source code repository and change into its directory (using the commands given above).

If you are building Atheme on a GNU/Linux system, or something which can sufficiently emulate that (like WSL 2 on Windows 10), execute the following commands:

$ ./configure
$ make
$ make install

If you are building Atheme on an OpenBSD (or similar) system, execute the following commands instead:

# pkg_add gmake
$ ./configure --disable-linker-defs
$ gmake
$ gmake install

Library Detection

If your user-installed libraries that you want Atheme to use are installed by your package manager to a directory such as /usr/local/, you may need to supplement the default compiler and linker search paths so that Atheme can detect those libraries (e.g. cracklib from FreeBSD Ports):

$ ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"

The following libraries generally require pkg-config to be installed:

  • PHC Argon2 Reference Implementation (libargon2.pc)
  • OpenSSL (libcrypto.pc)
  • GNU libidn (libidn.pc)
  • GNU Nettle (nettle.pc)
  • PCRE (libpcre.pc)
  • libqrencode (libqrencode.pc)
  • Sodium (libsodium.pc)

If you do not have pkg-config installed and want to use one or more of these libraries, please see ./configure --help for the options to set to override pkg-config discovery for those libraries. For example, if you wish to use GNU libidn, and it is installed into a default search path for your compiler and linker, and you do not have pkg-config installed, execute:

$ ./configure LIBIDN_CFLAGS="" LIBIDN_LIBS="-lidn"

If a library relies on populating LIBFOO_CFLAGS with some preprocessor definitions, or populating LIBFOO_LIBS with some library linking flags, this will generally fail. Install pkg-config for the best results.

Choice of compiler and its features

If you wish to compile Atheme with the LLVM project's C compiler (clang), you may also wish to use LLVM's linker (lld). You can accomplish this as follows:

$ ./configure CC="clang" LDFLAGS="-fuse-ld=lld"

If you want to use compiler sanitizers, and you want to build with Clang, you MUST also use LLD, as most of the sanitizers in Clang require LTO to function properly, and Clang in LTO mode emits LLVM bitcode, not machine code. The linker is ultimately responsible for performing most of the LTO heavy lifting, and translating the result into machine code, and most other linkers do not know how to do this.

To use compiler sanitizers with GCC (supported):

$ ./configure --disable-heap-allocator --disable-linker-defs \
    --enable-compiler-sanitizers CC="gcc"

To use compiler sanitizers with Clang (recommended):

$ ./configure --disable-heap-allocator --disable-linker-defs \
    --enable-compiler-sanitizers CC="clang" LDFLAGS="-fuse-ld=lld"

If you do enable the sanitizers, it is recommended to enable the configuration option general::db_save_blocking; see the example configuration file for more details.

The sanitizers are not recommended for production usage, but they are recommended for developers, including third parties writing new features and/or modifying the source code.

Getting More Help

If you're still lost, read the INSTALL file or check out our wiki for more hints.

libmowgli-2's People

Contributors

01mf02 avatar aaronmdjones avatar aji avatar alyx avatar andrewshadura avatar attilamolnar avatar awilfox avatar binki avatar clinew avatar crazy-hopper avatar diablo-d3 avatar dwfreed avatar enmand avatar grawity avatar heartmender avatar hlandau avatar ilbelkyr avatar jdhore avatar jillest avatar kaniini avatar loongson-zjl avatar maxteufel avatar midar avatar renegade334 avatar staticfox avatar tallica avatar unit193 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libmowgli-2's Issues

patricia.c and patricia.h are misleading titles

In order to find out what PATRICIA is, we need to trace it back to the origin of the term, as defined by D. R. Morrison in "Practical Algorithm to Retrieve Information Coded in Alphanumeric" which was published in the Journal of ACM in 1968. You should be able to find this document by Google searching "p514-morrison.pdf", though I'm not sure of the legality. I purchased my copy, and I encourage you to, also. It isn't the only document defining PATRICIA this way. I also recommend reading:

  • D.E. Knuth. The Art of Computer Programming Vol. 3, all of section 6.3.
  • R. Sedgewick. Algorithms in C. Addison-Wesley, edn 1, pp253, 1990.

I'll focus on the original paper, however, which outlines some very specific details about the data structure and algorithms denoted by PATRICIA, such as flowcharts, for example, though I'll stick to some of the textual descriptions:

Early in this evolution it was decided that the alphabet should be restricted to a binary one.

PATRICIA takes the structure of a binary tree. There are requirements that follow on from this, but the most significant without a doubt is this:

These facts are very useful in the allocation of storage for the index. They imply that the total storage required is completely determined by the number of ends, and all of the storage required will actually be used.

Every node should be a leaf.

In conclusion, I think the name of these algorithms, the collections that they create and the files they're expressed within should be renamed so as to avoid future confusion.

patricia should use heap offset pointers

The memory overhead of your patricia container on 64-bit systems is suboptimal. You already have your own memory pools so you can very easily cut the patricia overhead in half by replacing the patricia_elem pointers with a uint32_t offset from node_heap. I'd send you a pull request, but you don't have any unit tests 👎

It would be even better to have a 24-bit offset pointer represented as (uint8_t << 16) | uint16_t. This way 32-bit systems would also be able to benefit from the lower memory usage. However such a pointer would place a limitation of having no more than 2^24 nodes. I think that's an acceptable statically-defined behavior since 2^24 patricia_elems would take up 896 megs of memory.

You should also create mowgli_patricia_sizeof() function so people can measure the costs of using the patricia data structure.

Also you should not call patricia a "hashtable" in the README because radix trees don't hash anything. You'd be better off describing it as "a radix tree dictionary that offers performance at the expense of using a hilarious amount of memory".

libmowgli 2.1.0+ - cannot compile on Linux with musl libc

I was attempting to package libmowgli for Adélie Linux, a new distribution which uses the musl libc for strict POSIX conformance and speed. _SC_LEVEL1_DCACHE_LINESIZE is not defined by the musl libc, so the platform module fails to compile with this error:

cacheline.c: In function 'mowgli_cacheline_bootstrap':
cacheline.c:36:27: error: '_SC_LEVEL1_DCACHE_LINESIZE' undeclared (first use in this function)
  cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
cacheline.c:36:27: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [../../../buildsys.mk:349: cacheline.lib.o] Error 1
make[2]: *** [../../buildsys.mk:114: platform] Error 2

Perhaps that could be checked for by autoconf and only used where available, instead of assuming all Linux systems define it? However, Bionic defines it as 0, so it is likely not useful there either.

Show proper notice when pkg-config is missing

./configure --with-pcre will failed when pkg-config is missing but libpcre3-dev is installed. And the error message is PCRE not found. We should show a proper error message when pkg-config is missing.

Please remove SSLv3 support

SSLv3 has been removed from some distribution like Ubuntu/Debian

This means that 3 symbols have been removed :
SSLv3_method();
SSLv3_server_method();
SSLv3_client_method();

Those can still be used to set up SSLv3 connections, while using
the SSLv23_* methods won't talk SSLv3.

Christian

configure not honouring OpenSSL options properly

Script started on Fri Sep 15 12:44:02 2017
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m ./configure | grep OpenSSL
checking whether compiling and linking against 01;31mKOpenSSLmK works... yes
   01;31mKOpenSSLmK support: yes
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m K./configure 1@1@-1@-1@w1@i1@t1@h1@o1@u1@t1@-1@o1@p1@e1@n1@s1@s1@11111111111P1@-1@1P1@o1@p1@e1@n1@s1@s1@l1@1P
checking whether compiling and linking against 01;31mKOpenSSLmK works... no
   01;31mKOpenSSLmK support: no
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m K./configure --with-openssl1@=1@y1@e1@sSSL
checking whether compiling and linking against 01;31mKOpenSSLmK works... no
   01;31mKOpenSSLmK support: no
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m K./configure --with-openssl=ye111P1@n1@openSSL
   01;31mKOpenSSLmK support: no
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m K./configure 17P1@-1@-1@w1@i1@t1@h1@o1@u1@t1@-1@o1@p1@e1@n1@s1@s1@l
   01;31mKOpenSSLmK support: no
01;32mfrostsnow@test01;34m ~/libmowgli-2 $00m Kexit

Script done on Fri Sep 15 12:45:30 2017

Ugh, why is 'col' output so awful?

In summary:
Option | Got | Expected
no options | Y | Either
--with-openssl | N | Y
--with-openssl=yes | N | Y
--with-openssl=no | N | N
--without-openssl | N | N

2.1 release missing?

there's something strange in libmowgli... there are a bunch of commits since the last release (2.0.0?) that have not been released as a tag. yet the atheme package mentions using mowgli 2.1 in some commitlogs, and in fact, the API changed.. see for example atheme/atheme@3b5a178

could we get a release of libmowgli - otherwise how are we supposed to build atheme?

There is a memory leak defect at line 110 in /libmowgli-2/src/libmowgli/base/argstack.c.

Hello! I am a graduate student specializing in static analysis. Recently, I used a static analysis tool to test libmowgli-2 and found a potential memory leak defect. Here are the specific details of the defect:

Affected Version:
libmowgli-2 2.1.3 21abd51

Vulnerability Description:
The vulnerability is a memory leak bug located at line 110 of the file /libmowgli-2/src/libmowgli/base/argstack.c. This vulnerability could potentially be exploited maliciously to cause resource exhaustion and denial of service attacks.

libmowgli-2 download address:
https://github.com/atheme/libmowgli-2.git

Detailed Description of the Defect:

1.At line 87 of the file /libmowgli-2/src/libmowgli/base/argstack.c, a pointer named 'e' is defined, and it is allocated a dynamic memory area using the mowgli_alloc function. When the switch statement at line 89 enters the default branch at line 107, although the dynamic memory area stored in the variable 'out' is released by calling the mowgli_object_unref function at line 108, the statement that adds the pointer 'e' to the variable 'out' is located at line 113. This means that in this iteration of the loop, 'e' has not yet been added to the variable 'out'. Subsequently, the program returns at line 110, during which the memory area pointed to by 'e' is not released, thus resulting in a memory leak defect, as illustrated below:

image

libmowgli 2.0.0 fails to build with --enable-examples

Not a blocker, but in previous releases one could build the examples and run them for a little bit of testing whether they still work with changes in the library.

./src/examples/helpertest is the first example that fails to build:

helpertest.c: In function ‘timer_oneshot’:
helpertest.c:30:22: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘out_fd’
helpertest.c: In function ‘timer_tick’:
helpertest.c:37:22: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘out_fd’
helpertest.c: In function ‘helper_start’:
helpertest.c:47:22: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘out_fd’
helpertest.c:54:22: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘out_fd’
helpertest.c: In function ‘helper_read’:
helpertest.c:81:17: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘in_fd’
helpertest.c:84:69: error: ‘mowgli_eventloop_helper_proc_t’ has no member named ‘in_fd’

make: *** [libmowgli-2] Error 2

Hello,

I have a problem with making the source. the make command can't find libmowgli2, I installed the libmowgli-dev package, but no any changes has been made.
Note: I downloaded the source from github and check it out to 7.1.0

~/atheme$ make --debug
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
Reading makefiles...
Updating goal targets....
File all' does not exist. Filesubdirs' does not exist.
File pre-recurse' does not exist. Must remake targetpre-recurse'.
Successfully remade target file pre-recurse'. Filelibmowgli-2' does not exist.
Must remake target `libmowgli-2'.
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
Reading makefiles...
make[1]: *** No targets specified and no makefile found. Stop.
make: *** [libmowgli-2] Error 2

** I think another configuration needed for the libmowgli2 in ./configure options, Since the log of the configure is: **
=== configuring in libmowgli-2 (/home/salehi/atheme/libmowgli-2)
configure: WARNING: no configuration information is in libmowgli-2

Configuration:
Atheme version : 7.1.0
Installation prefix : /opt/atheme
Module root directory: /opt/atheme
Config directory : ${prefix}/etc
Logfile directory : ${prefix}/var
Data directory : ${prefix}/etc
PID directory : ${prefix}/var
Large network support: no
OpenSSL SASL support : yes
Contrib modules : no
Mowgli installation : internal
PCRE support : no
Perl support : no
JSON support : no
QR Code support : no
CFLAGS : -g -O2
Internationalization : yes

Type make to build Atheme, and make install to install it.

should this still compile under win32 mingw?

It does not on my mingw installation...

therock247uk@dell-PC /c/users/therock247uk/desktop/libmowgli-2-master/libmowgli-
2-master
$ dir
AUTHORS autogen.sh config.status extra.mk.in src
BSDmakefile buildsys.mk config.sub install-sh uncrustify.cfg
COPYING buildsys.mk.in configure libmowgli-2.pc
GIT-Access config.guess configure.ac libmowgli-2.pc.in
Makefile config.log doc m4
README config.rpath extra.mk scripts

therock247uk@dell-PC /c/users/therock247uk/desktop/libmowgli-2-master/libmowgli-
2-master
$ make
CompileExe: bootstrap.o
In file included from c:\users\therock247uk\desktop\mingw\lib\gcc\mingw32\4.8.1
include\stdint.h:9:0,
from ../core/stdinc.h:39,
from ../mowgli.h:40,
from bootstrap.c:24:
c:\users\therock247uk\desktop\mingw\include\stdint.h:39:21: error: conflicting t
ypes for 'int8_t'
typedef signed char int8_t;
^
In file included from C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/time.
h:32:0,
from ../core/stdinc.h:33,
from ../mowgli.h:40,
from bootstrap.c:24:
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/sys/types.h:106:14: note: p
revious declaration of 'int8_t' was here
typedef char int8_t;
^
In file included from ../mowgli.h:40:0,
from bootstrap.c:24:
../core/stdinc.h:59:0: warning: "WINVER" redefined [enabled by default]

define WINVER 0x0501

^
In file included from c:\users\therock247uk\desktop\mingw\include_mingw.h:35:0,

             from c:\users\therock247uk\desktop\mingw\include\stdint.h:28,
             from c:\users\therock247uk\desktop\mingw\lib\gcc\mingw32\4.8.1\

include\stdint.h:9,
from ../core/stdinc.h:39,
from ../mowgli.h:40,
from bootstrap.c:24:
c:\users\therock247uk\desktop\mingw\include\sdkddkver.h:159:0: note: this is the
location of the previous definition

define WINVER _WIN32_WINNT

^
In file included from ../core/stdinc.h:62:0,
from ../mowgli.h:40,
from bootstrap.c:24:
c:\users\therock247uk\desktop\mingw\include\winsock2.h:132:2: warning: #warning
"fd_set and associated macros have been defined in sys/types. This may caus
e runtime problems with W32 sockets" [-Wcpp]
#warning "fd_set and associated macros have been defined in sys/types.
^
In file included from C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/stdio
.h:32:0,
from ../core/stdinc.h:28,
from ../mowgli.h:40,
from bootstrap.c:24:
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/sys/time.h:73:55: warning:
'struct timezone' declared inside parameter list [enabled by default]
int _EXFUN(gettimeofday, (struct timeval ___p, struct timezone *__z));
^
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/_ansi.h:38:35: note: in def
inition of macro '_EXFUN'
#define _EXFUN(name, proto) name proto
^
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/sys/time.h:73:55: warning:
its scope is only this definition or declaration, which is probably not what you
want [enabled by default]
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
^
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/_ansi.h:38:35: note: in def
inition of macro '_EXFUN'
#define _EXFUN(name, proto) name proto
^
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/sys/time.h:74:64: warning:
'struct timezone' declared inside parameter list [enabled by default]
int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
^
C:/Users/therock247uk/Desktop/mingw/msys/1.0/include/_ansi.h:38:35: note: in def
inition of macro '_EXFUN'
#define EXFUN(name, proto) name proto
^
In file included from ../mowgli.h:83:0,
from bootstrap.c:24:
../eventloop/eventloop.h: In function 'mowgli_eventloop_synchronize':
../eventloop/eventloop.h:223:19: warning: assignment from incompatible pointer t
ype [enabled by default]
GetTickCount64 = GetProcAddress(hKernel32, "GetTickCount64");
^
make[3]: *
* [bootstrap.o] Error 1
make[2]: *** [core] Error 2
make[1]: *** [libmowgli] Error 2
make: *** [src] Error 2

therock247uk@dell-PC /c/users/therock247uk/desktop/libmowgli-2-master/libmowgli-
2-master
$

latest git atheme/libmowgli2

p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: channels.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from channels.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: cidr.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from cidr.c:30:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: cmode.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from cmode.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: commandtree.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from commandtree.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: ctcp-common.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from ctcp-common.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: conf.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from conf.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: confprocess.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from confprocess.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: connection.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from connection.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: crypto.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from crypto.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: culture.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from culture.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: database_backend.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from database_backend.c:8:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: datastream.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from datastream.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: entity.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from entity.c:5:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: flags.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from flags.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: function.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from function.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
function.c: In function 'canonicalize_email':
function.c:309:9: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
function.c: In function 'sendemail':
function.c:694:3: warning: #warning implement me :( [-Wcpp]
CompileLib: help.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from help.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: hook.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from hook.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: linker.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from linker.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: logger.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from logger.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: match.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from match.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: md5.lib.o
CompileLib: memory.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from memory.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: module.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from module.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: node.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from node.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: object.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from object.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: packet.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from packet.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: phandler.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from phandler.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: pmodule.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from pmodule.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: privs.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from privs.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
CompileLib: ptasks.lib.o
In file included from ../libmowgli-2/src/libmowgli/mowgli.h:81:0,
from ../include/stdinc.h:13,
from ../include/atheme.h:18,
from ptasks.c:24:
../libmowgli-2/src/libmowgli/eventloop/eventloop.h: In function 'mowgli_eventloo
p_synchronize':
../libmowgli-2/src/libmowgli/eventloop/eventloop.h:198:19: warning: assignment f
rom incompatible pointer type [enabled by default]
ptasks.c: In function 'handle_stats':
ptasks.c:136:90: error: 'mowgli_eventloop_timer_t' has no member named 'when'
make[1]: *** [ptasks.lib.o] Error 1
make: *** [libathemecore] Error 2

patricia foreach with prefix

The ability to iterate over the values in a patricia whose keys begin with a certain prefix is a very valuable feature, especially if the number of elements with that prefix is much smaller than the number of elements in the patricia as a whole. The structure of a patricia lends itself nicely to this sort of operation.

ircd-micro was recently ported to libmowgli. As part of this port, all uses of micro's trie were replaced with mowgli patricias. micro's trie had the above feature, and it was used when iterating over the users on a particular server. This could be done by iterating over users_by_uid with the server's SID as the prefix. After the port, this was accomplished by iterating over users_by_uid and performing strncmp, which is slightly slower (but not slow enough to be a big deal at this point, really).

Another practical application of such a feature would be Atheme metadata. Object metadata in Atheme is often namespaced with colons, such as "private:userhost" or "private:closer". Being able to iterate over only pairs starting with "private:" or "private:userhost:" would be a useful capability. It wouldn't be much of a speedup, but would result in clearer code.

libmowgli-2 incompatible for libguess, libmcs ?

You can not build libguess, libmcs against libmowgli-2, cause of:

for libguess:
checking for libmowgli >= 0.9.50... no
configure: error: Install Mowgli from http://atheme.org/project/mowgli.

for libmcs:
checking for MOWGLI... no
configure: error: libmowgli 0.4.0 or newer required

this can not work, cause pkg-config should ask for "libmowgli-2" not "libmowgli", right ?
Will there be updates for libguess and libmcs ?

Thanks for info
Chris

Outdated config.sub/config.guess fail on MSYS2

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ git describe
fatal: No annotated tags can describe 'd8394bc2b963539b78a303af064484f1044ea040'.
However, there were unannotated tags: try --tags.

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ ./autogen.sh
*info* running aclocal (-I m4)
*info* running autoheader
*info* running autoconf

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ ./configure --prefix="${PWD}-prefix" CFLAGS="-Wall -O2 -pipe"
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2012-02-10, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <[email protected]> in order to provide the needed
information to handle your system.

config.guess timestamp = 2012-02-10

uname -m = x86_64
uname -r = 2.5.0(0.294/5/3)
uname -s = MSYS_NT-10.0
uname -v = 2016-03-01 13:48

/usr/bin/uname -p = unknown
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = x86_64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = x86_64
UNAME_RELEASE = 2.5.0(0.294/5/3)
UNAME_SYSTEM  = MSYS_NT-10.0
UNAME_VERSION = 2016-03-01 13:48
configure: error: cannot guess build type; you must specify one

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ ./configure --prefix="${PWD}-prefix" CFLAGS="-Wall -O2 -pipe" --build x86_64-mingw-w64
checking build system type... Invalid configuration `x86_64-mingw-w64': system `w64' not recognized
configure: error: /bin/sh ./config.sub x86_64-mingw-w64 failed

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ ./configure --prefix="${PWD}-prefix" CFLAGS="-Wall -O2 -pipe" --build x86_64-mingw64
checking build system type... Invalid configuration `x86_64-mingw64': system `mingw64' not recognized
configure: error: /bin/sh ./config.sub x86_64-mingw64 failed

ohnob@DESKTOP-A4G2C0J  ~/repos/libmowgli-2
$ ./configure --prefix="${PWD}-prefix" CFLAGS="-Wall -O2 -pipe" --build x86_64-mingw32
checking build system type... x86_64-pc-mingw32
checking host system type... x86_64-pc-mingw32
checking target system type... x86_64-pc-mingw32
checking for gcc... gcc

I have to manually specify a --build parameter that it likes to get the ./configure script to run. In normal projects which use automake, ./autogen.sh or autoreconf -vfi will update config.guess and config.sub so that I can run ./configure without needing to specify --build. It seems to me that ./autogen.sh is broken because it doesn’t know how to update config.sub and config.guess.

null dereference

libmowgli-2/src/libmowgli/container/list.c line 354

when l->tail == NULL, the condition in line 351 evaluate to false, do not enter into the if statement

and in line 354, access to field 'next' results in a dereference of a null pointer (loaded from field 'tail')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.