Skip to content
Proyek

Tentang

muparser adalah pustaka pengurai ekspresi matematika yang cepat untuk C/C++, dengan dukungan OpenMP opsional.

Alat pengembangan

Cara angka ini diukur

Yang dapat Anda lakukan

  • added a rnd() function

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

GitHub issues Version Packaging status

muparser - fast math parser library

title

Change Notes for Revision 2.4.0 (pre-release)

The current pre-release is v2.4.0-rc1. The release formerly planned as 2.3.6 is now 2.4.0, because the C++ ABI changed (see below).

ABI Change:

  • The binary interface of the C++ classes changed (https://github.com/beltoforion/muparser/pull/188). Programs using the C++ interface of the shared library must be recompiled. The soname now includes the minor version (libmuparser.so.2.4); patch releases keep the binary interface, a new minor version may change it. The C API (muParserDLL.h) is not affected.

Changes:

Security Fixes:

  • Issue https://github.com/beltoforion/muparser/issues/167: Add additional checks to eliminate possibility of access violations due to malformed expressions. I dont have test cases and do not know whether this issue was exploitable at all but fixing them made sense.
  • Issue https://github.com/beltoforion/muparser/issues/168: ClearConst() now also clears the internal string variable buffer (m_vStringVarBuf) to keep it in sync with the name-to-index map (m_StrVarDef). Previously stale entries accumulated across repeated ClearConst() calls.
  • Issue https://github.com/beltoforion/muparser/pull/170: Several memory safety, undefined behaviour and thread safety fixes, among them a use-after-free in mupRelease, exceptions crossing the C API boundary and data races on static buffers of the C API.
  • Issue https://github.com/beltoforion/muparser/issues/171: ParserInt now throws ecDOMAIN_ERROR instead of causing a signed integer overflow in Add, Sub, Mul, the unary minus and when rounding values that do not fit into an int.
  • Issue https://github.com/beltoforion/muparser/issues/176: ParserInt::IsBinVal performed the bit shift for binary literals in a signed type, triggering sanitizer reports for literals starting with 1.
  • Issue https://github.com/beltoforion/muparser/issues/182: The C API (muParserDLL) no longer crashes when called with a null parser handle or with null string / pointer arguments. Calls with a null handle are ignored and return default values, null arguments are reported through the regular error mechanism (mupError).
  • Issue https://github.com/beltoforion/muparser/pull/183: Fixed a heap over-read in ParserTokenReader::IsOprt when a user defined binary operator of four or more characters was checked near the end of the expression.
  • Issue https://github.com/beltoforion/muparser/pull/184: Eval(int&) and mupEvalMulti ran incomplete bytecode left behind by a failed parse when called again on the same expression, reading past the end of the value stack. Eval(int&) directly after GetUsedVar() now reports undefined variables instead of evaluating them as 0.
  • Issue https://github.com/beltoforion/muparser/pull/186: Fixed data races on the locale shared by all parser instances (SetDecSep, SetThousandsSep, ResetLocale) and on the random number generator of rnd().
  • Issue https://github.com/beltoforion/muparser/pull/188: SetByteCode kept the stack buffer and the number of results of the previously evaluated expression, so evaluating restored bytecode could read past the end of the value stack.

Bug Fixes:

Fixed Compiler Warnings and Errors:

Change Notes for Revision 2.3.5

New Features:

  • added a rnd() function

Fixed Compiler Warnings:

  • Fix problem with IntelLLVM fast math

Build System:

Change Notes for Revision 2.3.4

Maintainance Release with updates of the cmake build system.

Build System:

  • cmake is using OpenMP target and setting _UNICODE preprocessor definition

Fixed Compiler Warnings:

Change Notes for Revision 2.3.3

To read the full documentation please go to: http://beltoforion.de/en/muparser.

See Install.txt for installation

Security Fixes:

The following new issues, discovered by oss-fuzz are fixed:

Bugfixes:

Fixed Compiler Warnings:

  • Visual Studio: Disabled compiler warning 26812 (Prefer 'enum class' over 'enum') Use of plain old enums has not been deprecated and only MSVC is complaining.
  • Visual Studio: Disabled compiler warning 4251 (... needs to have dll-interface to be used by clients of class ...) For technical reason the DLL contains the class API and the DLL API. Just do not use the class API if you intent to share the dll accross windows versions. (The same is true for Linux but distributions do compile each application against their own library version anyway)

Changes:

  • Adding manual definitions to avoid potential issues with MSVC
  • Adding missing overrides
  • Added a new option "-DENABLE_WIDE_CHAR" to CMake for building muparser with wide character support
  • export muparser targets, such that client projects can import it using find_package() (https://github.com/beltoforion/muparser/pull/81#event-3528671228)

Jelajahi proyek terkait

Memuat…