k-takata / bregonig Goto Github PK
View Code? Open in Web Editor NEWThis is a source code repository of bregonig.dll regular expression library.
Home Page: http://k-takata.o.oo7.jp/mysoft/bregonig.html
License: Other
This is a source code repository of bregonig.dll regular expression library.
Home Page: http://k-takata.o.oo7.jp/mysoft/bregonig.html
License: Other
bregonig.dll Ver.4.00において、BSubstで検索パターンと検索文字列が完全一致し、置換パターンが空の場合にアクセス違反が起きます。
python\sample_subst.pyの検索文字列を次のように設定し、
t1 = "0123".encode('ASCII')
検索・置換パターンを次のように設定して実行すると、
pattern1 = r"s/0123//g".encode('ASCII')
以下のエラーが発生します。
$ python 01sample_subst.py
bregonig.dll Ver.4.00 with Onigmo 6.0.0
Traceback (most recent call last):
File "01sample_subst.py", line 23, in <module>
print("after(%d)=%s" % (ctr, string_at(rxp.contents.outp).decode('ASCII')))
File "e:\Programs\Python27-32\lib\ctypes\__init__.py", line 506, in string_at
return _string_at(ptr, size)
WindowsError: exception: access violation reading 0x00000000
exit status 1
BSubst(): 's/0123//g' (038377D4), 038376B4, 038376B4, 038376B8
recompile_onig(): s/0123//g
recompile_onig_ex()
patternp: 0123//g, len: 4
prerepp: /g, len: 0
optionp: g, len: 1
compare_pattern: 0123//g, len: 4compare: -1
option: gcompile_rep()
rx:0x014272e8
subst_onig()
one_shot: 0
one_shot: 0
subst_count: 1
(393c.3080): Access violation - code c0000005 (first chance)
Windows 10 pro(バージョン1607)x64
bregonig.dll Ver.4.00(32bit)
Python 2.7.13(32bit)
報告は以上です。
run nmake VS2017 as below.
nmake ONIG_DIR=../../Onigmo
error C2248 occurred as below.
sv.cpp(334): error C2248: 'std::bad_alloc::bad_alloc': private メンバー (クラス 'std::bad_alloc' で宣言されている) にアクセスできません。
C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\vcruntime_exception.h(122): note: 'std::bad_alloc::bad_alloc' の宣言を確認してください
C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\vcruntime_exception.h(109): note: 'std::bad_alloc' の宣言を確認してください
sv.cpp(470): error C2248: 'std::bad_alloc::bad_alloc': private メンバー (クラス 'std::bad_alloc' で宣言されている) にアクセスできません。
C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\vcruntime_exception.h(122): note: 'std::bad_alloc::bad_alloc' の宣言を確認してください
C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\vcruntime_exception.h(109): note: 'std::bad_alloc' の宣言を確認してください
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\cl.EXE"' : リターン コード '0x2'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.