Code Monkey home page Code Monkey logo

bregonig's People

Contributors

k-takata 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kakari m-tmatma

bregonig's Issues

Access violation occurs at Bsubst

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

WinDbgに表示されたTRACEの出力

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)

報告は以上です。

compile error C2248 in sv.cpp with Visual Studio 2017

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'

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.